因为为此帐户启用了

因为为此帐户启用了

本文介绍了AWS:S3存储桶AWS您无法授予公共访问权限,因为为此帐户启用了“阻止公共访问权限"设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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

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

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>

推荐答案

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

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

这篇关于AWS:S3存储桶AWS您无法授予公共访问权限,因为为此帐户启用了“阻止公共访问权限"设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 08:37