Skip to content

Commit 6dc2d2e

Browse files
committed
add list bucket permission
1 parent 2932512 commit 6dc2d2e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cloudformation/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,21 @@ Resources:
748748
- Effect: Allow
749749
Principal:
750750
Service: cloudfront.amazonaws.com
751-
Action: s3:GetObject
751+
Action:
752+
- s3:GetObject
752753
Resource: !Sub "${AppFrontendS3Bucket.Arn}/*"
753754
Condition:
754755
StringEquals:
755756
AWS:SourceArn: !Sub "arn:aws:cloudfront::${AWS::AccountId}:distribution/${AppFrontendCloudfrontDistribution}"
757+
- Effect: Allow
758+
Principal:
759+
Service: cloudfront.amazonaws.com
760+
Action:
761+
- s3:ListBucket
762+
Resource: !Sub "${AppFrontendS3Bucket.Arn}"
763+
Condition:
764+
StringEquals:
765+
AWS:SourceArn: !Sub "arn:aws:cloudfront::${AWS::AccountId}:distribution/${AppFrontendCloudfrontDistribution}"
756766

757767
CloudfrontNoCachePolicy:
758768
Type: AWS::CloudFront::CachePolicy

0 commit comments

Comments
 (0)