Created
March 26, 2024 04:18
-
-
Save overnew/8bcad26b93accf6a5f3ecdf77756eb86 to your computer and use it in GitHub Desktop.
s3_cloudFront.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowCloudFrontServicePrincipalReadOnly", | |
"Effect": "Allow", | |
"Principal": { | |
#cloudFront를 대상으로 아래의 action을 허용 | |
"Service": "cloudfront.amazonaws.com" | |
}, | |
"Action": [ | |
"s3:GetObject", | |
"s3:GetObjectVersion" | |
], | |
#현재 버킷의 arn, 모든 폴더를 의미하는 '/*'를 뒤에 붙여주자. | |
"Resource": "arn:aws:s3:::lab-bucket-611012227/*", | |
"Condition": { | |
"StringEquals": { | |
# cloudFront의 ARN입력 | |
"AWS:SourceArn": "arn:aws:cloudfront::895963612424:distribution/E13P1AK" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment