Search code examples
amazon-web-servicesbucket

AWS: What's the point of setting bucket-level policy?


What's the point of setting bucket-level policy, now that the individual objects will be always be private by default and have to be individually made public?


Solution

  • I believe bucket policies can still be used to make all bucket objects public to anonymous users. For example, taken from the s3 docs here:

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

    This bucket policy would make all objects in the bucket publicly available to anon users.