Skip to content

Instantly share code, notes, and snippets.

@overnew
Created March 26, 2024 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save overnew/8bcad26b93accf6a5f3ecdf77756eb86 to your computer and use it in GitHub Desktop.
Save overnew/8bcad26b93accf6a5f3ecdf77756eb86 to your computer and use it in GitHub Desktop.
s3_cloudFront.yaml
{
"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