1

I've created AWS s3 buckets with several thousand objects, initially the access policy was restricted to authenticated users, but later due to some requirement we need to make all objects in this bucket publicly visible. For this we have made the following changes.

  1. Added new permission set "Everyone" with "List" access.
  2. Added new policy to bucket.

**

{
    "Version": "2012-10-17",
    "Id": "Policy1111",
    "Statement": [
        {
            "Sid": "makeitpublic",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::bucketname/*"
        }
    ]
}

**

After this I can see some objects in bucket are publicly accessible while others are not. My question is after make this bucket "Public" will the new permissions will be applied to all existing objects or only to the newly uploaded objects ?

If yes then is there any way to bulk change permission of objects in a bucket.

4
  • I think your Principal should be * and you should also have a * after your bucketname in the Resource, so "arn:aws:s3:::bucketname/*"
    – javabrett
    May 7, 2015 at 12:58
  • Thanks for pointing out, well both are *. I've corrected in the question. May 7, 2015 at 13:04
  • Are you able to share any of the initial policies that were applied before the decision to grant public/anonymous access? Were there any explicit deny policies?
    – javabrett
    May 7, 2015 at 13:33
  • Well there were no policies before this, currently this is the sole policy in place. May 7, 2015 at 14:13

1 Answer 1

0

I think you should check the S3 web console under the Permission tab to verify the older objects policy. Normally API issued policy are valid for newly uploaded objects, but changing the bucket permission via web console should fix it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.