S3 Bucket AWS You can't grant public access because Block public access settings are turned on for this account

萝らか妹 提交于 2019-12-22 07:59:09

问题


I want to make S3 bucket public to everyone but I get access denied when I do That and it Says

You can't grant public access because Block public access settings 
are turned on for this account. To determine which settings are 
turned on, check your Block public access settings.

When I go to public access settings everything is turned off.

I did set IAM User and User has AmazonS3FullAccess policy

{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": "s3:*",
        "Resource": "*"
    }
  ]
 }

I did set policy on the bucket

{
"Version": "2012-10-17",
"Id": "Policy1557294263403",
"Statement": [
    {
        "Sid": "Stmt1557294241958",
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::726051891502:user/borroup-admin"
        },
        "Action": "s3:*",
        "Resource": [
            "arn:aws:s3:::borroup",
            "arn:aws:s3:::borroup/*"
        ]
      }
    ]
 }

I did set CORS configuration editor on the bucket

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
</CORSConfiguration>

回答1:


It seems like it has to be unchecked from both places Permissions and Block public access (account settings).




回答2:


I hope you have sorted this out already, if not go to Edit public access settings Edit public access settings then type confirm in the next screen to go ahead with the change confirm



来源:https://stackoverflow.com/questions/56094367/s3-bucket-aws-you-cant-grant-public-access-because-block-public-access-settings

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