在S3中我的存储桶存在问题,现在我无法访问。

huangapple go评论56阅读模式
英文:

Bad policy on my bucket in S3 and now I don't have any access

问题

I have applied a bad policy in my bucket and now I can't access to any configuration.

This is the policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::my-bucket",
                "arn:aws:s3:::my-bucket/*"
            ],
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": "instance-ip"
                }
            }
        }
    ]
}

And this is the result:

在S3中我的存储桶存在问题,现在我无法访问。

Any solution? Please 在S3中我的存储桶存在问题,现在我无法访问。

英文:

I have applied a bad policy in my bucket and now I can't access to any configuration.

This is the policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::my-bucket",
                "arn:aws:s3:::my-bucket/*"
            ],
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": "instance-ip"
                }
            }
        }
    ]
}

And this is the result:

在S3中我的存储桶存在问题,现在我无法访问。

Any solution? Please 在S3中我的存储桶存在问题,现在我无法访问。

答案1

得分: 2

需要登录为根账户,然后删除该策略。
链接:https://repost.aws/knowledge-center/s3-accidentally-denied-access

英文:

You need to login as root account and then delete the policy.

https://repost.aws/knowledge-center/s3-accidentally-denied-access

答案2

得分: 0

登录您的根帐户(而不是IAM帐户),然后您将能够移除该策略。链接:https://repost.aws/knowledge-center/s3-accidentally-denied-access

英文:

Login as your root account (not IAM) and you will be able to remove the policy. https://repost.aws/knowledge-center/s3-accidentally-denied-access

huangapple
  • 本文由 发表于 2023年4月20日 04:23:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76058539.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定