Amazon S3 Bucket Policy Public Access Denied

本秂侑毒 提交于 2020-12-01 08:59:26

问题


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/*"
      ]
    }]
}

回答1:


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)




回答2:


AWS has introduced Amazon S3 Block Public Access – Another Layer of Protection for Your Accounts and Buckets | AWS News Blog.

You must now disable this feature on any buckets you wish to be publicly accessible.




回答3:


To enable public access to an object, Modify the public access for the account such as

Also enable the same at the bucket level as well

Without these changes, you cannot add new public policy.




回答4:


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).



来源:https://stackoverflow.com/questions/53346275/amazon-s3-bucket-policy-public-access-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!