Reputation: 173
I'm using the Coda app at add, edit, and save files on my S3 bucket.
The bucket has static web hosting enabled.
Every time I upload or save a file, the permissions automatically change to restrict the "world" from reading the file.
How can Amazon S3 bucket permissions be set so every time I save a file read permissions stay public?
Upvotes: 1
Views: 1346
Reputation: 173
Instead of adding a new bucket policy, I fixed my problem by aliasing a domain name to my bucket. When I access bucket files through the alias, I'm seeing no permission errors.
Upvotes: 0
Reputation: 181
Add a bucket wide policy rather than on each file:
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::my-brand-new-bucket/*"
]
}
]
}
http://s3browser.com/working-with-amazon-s3-bucket-policies.php
Upvotes: 2