【问题标题】:Iam user can not see any bucket on s3Iam 用户在 s3 上看不到任何存储桶
【发布时间】:2021-10-29 01:17:32
【问题描述】:

我使用 root 用户创建存储桶调用xxx,我还创建了 IAM 用户。当我通过 IAM 用户登录时,我访问 S3 并看到错误:

You don't have permissions to list buckets
After you or your AWS administrator have updated your permissions to allow the s3:ListAllMyBuckets action, refresh this page. Learn more about Identity and access management in Amazon S3

我尝试在 IAM 上创建如下策略并为我的 IAM 用户附加。但我还是有错误?为什么 IAM 用户无法访问 s3。我还为 IAM 用户添加了AmazonS3FullAccess 权限。

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:ListStorageLensConfigurations",
                "s3:ListAccessPointsForObjectLambda",
                "s3:GetAccessPoint",
                "s3:PutAccountPublicAccessBlock",
                "s3:GetAccountPublicAccessBlock",
                "s3:ListAllMyBuckets",
                "s3:ListAccessPoints",
                "s3:ListJobs",
                "s3:PutStorageLensConfiguration",
                "s3:CreateJob"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::*/*",
                "arn:aws:s3:::xxx"
            ]
        }
    ]
}

【问题讨论】:

  • 还有其他类型的策略可能会影响您的用户,例如基于资源的存储桶策略或 SCP 策略或权限边界。假设这些都无效,您应该在自定义策略中使用s3:ListBuckets。如果您已将“AmazonS3FullAccess”策略附加到用户并且没有其他拒绝访问的策略,则用户将能够看到存储桶。如果用户不能,那么你做错了什么。

标签: amazon-web-services amazon-s3 amazon-iam


【解决方案1】:

我有同样的错误,因为我忘记通过以 root 用户电子邮件登录来添加管理员组用户,然后以 iam 身份登录,应该很好。

【讨论】:

    猜你喜欢
    • 2016-03-12
    • 2019-02-26
    • 2023-03-29
    • 2013-10-25
    • 1970-01-01
    • 2023-04-05
    • 2022-01-10
    • 2017-04-30
    • 2021-06-22
    相关资源
    最近更新 更多