Skip to content

Instantly share code, notes, and snippets.

@hugomota
Created July 28, 2022 13:52
Show Gist options
  • Save hugomota/a4100fddac35498ca92a2e814f6f7bf4 to your computer and use it in GitHub Desktop.
Save hugomota/a4100fddac35498ca92a2e814f6f7bf4 to your computer and use it in GitHub Desktop.
{
"Version":"2008-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Deny",
"Principal":"*",
"Action":[
"s3:GetObject",
"s3:PutObject"
],
"Resource":"arn:aws:s3:::{bucket_name}/*",
"Condition":{
"Bool":{
"aws:SecureTransport":"false"
}
}
},
{
"Effect":"Allow",
"Principal":{
"AWS":"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1K1EAJVVK5H0F"
},
"Action":"s3:GetObject",
"Resource":"arn:aws:s3:::{bucket_name}/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment