Skip to content

Instantly share code, notes, and snippets.

@SteveHoggNZ
Created January 20, 2017 02:49
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 SteveHoggNZ/222a8216ce0bbb6943b2d1029274b75d to your computer and use it in GitHub Desktop.
Save SteveHoggNZ/222a8216ce0bbb6943b2d1029274b75d to your computer and use it in GitHub Desktop.
CloudFormation / Public-readable bucket policy
"MyS3BucketPolicy": {
"Type": "AWS::S3::BucketPolicy",
"Properties": {
"Bucket": { "Ref": "MyS3Bucket" },
"PolicyDocument" : {
"Version":"2012-10-17",
"Statement":[{
"Sid": "PublicReadAccess",
"Effect": "Allow",
"Principal": "*",
"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