Make an Amazon S3 bucket public
If you are hosting a static site using AWS S3, then you'll need to make the bucket public to access the files. This policy will do just that.
To add a policy, navigate to the bucket within the S3 UI and open the properties panel. Click Add Policy and paste the contents below, replacing bucket with the actual bucket name.
{
"Version":"2008-10-17",
"Statement":[{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": {
"AWS": "*"
},
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::bucket/*"
]
}
]
}
Written by Leon Barrett
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#S3
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#