S3存储桶AWS您无法授予公共访问权限,因为为此帐户已启用了阻止公共访问设置

Ame*_*rat 4 ruby-on-rails amazon-s3 amazon-web-services aws-sdk

我想向所有人公开S3存储桶,但是这样做时我被拒绝访问

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.
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

当我进入公共访问设置时,所有功能均已关闭。

在此处输入图片说明

我确实设置了IAM用户,并且用户具有AmazonS3FullAccess策略

{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": "s3:*",
        "Resource": "*"
    }
  ]
 }
Run Code Online (Sandbox Code Playgroud)

我确实设定了策略

{
"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/*"
        ]
      }
    ]
 }
Run Code Online (Sandbox Code Playgroud)

我确实在存储桶上设置了CORS配置编辑器

<?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>
Run Code Online (Sandbox Code Playgroud)

Ame*_*rat 7

似乎必须在“权限”和“阻止公共访问”(帐户设置)两个地方都取消选中它。

在此处输入图片说明