Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit 5cdee89

Browse files
committed
chore(infra): add policy for accessing the S3 marts bucket
1 parent c1f561c commit 5cdee89

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Parameters:
2+
App:
3+
Type: String
4+
Description: Your application's name.
5+
Env:
6+
Type: String
7+
Description: The environment name your service, job, or workflow is being deployed to.
8+
Name:
9+
Type: String
10+
Description: Your workload's name.
11+
TaskRole:
12+
Type: String
13+
Description: The ARN of the task role.
14+
15+
Resources:
16+
S3martsBucketAccessPolicy:
17+
Type: AWS::IAM::Policy
18+
Properties:
19+
PolicyName: s3martsBucketPolicy
20+
# Attach this policy to the TaskRole provided by Copilot.
21+
Roles:
22+
- !Ref TaskRole
23+
PolicyDocument:
24+
Version: "2012-10-17"
25+
Statement:
26+
- Sid: S3ObjectActions
27+
Effect: Allow
28+
Action: s3:GetObject
29+
Resource: "arn:aws:s3:::caltrans-pems-prd-us-west-2-marts/*"
30+
- Sid: S3ListAction
31+
Effect: Allow
32+
Action: s3:ListBucket
33+
Resource: "arn:aws:s3:::caltrans-pems-prd-us-west-2-marts"
34+
35+
Outputs:
36+
S3martsAccessPolicyArn:
37+
Description: "The ARN of the S3 marts access policy"
38+
Value: !Ref S3martsBucketAccessPolicy

0 commit comments

Comments
 (0)