Amazon S3 Bucket Policy Public Access Denied

Viewed 30705

I'm trying to make my S3 bucket public but when I add the following policy I get Error Access Denied:

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

Go in to your Bucket > Permissions > Public access settings > Edit > Untick Block new public ACLs and uploading public objects and Remove public access granted through public ACLs (warning)

enter image description here

To enable public access to an object, Modify the public access for the account such as enter image description here

Also enable the same at the bucket level as well enter image description here

Without these changes, you cannot add new public policy.

While AWS policy is quite dynamic please be aware that below answer works for the date when I provide it and it can change in time. What is required to CREATE new bucket with public access policy is to change account level "Block public access" configuration to following: enter image description here

Once this change is done, next the regular settings on the Bucket level need to be performed as well - adding policy and change bucket level "Block public access" (in the same way as it was done on account level).

Related