Question

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?

Was it helpful?

Solution 2

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top