skip to Main Content

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:

enter image description here

Any solution? Please 🙁

2

Answers


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

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

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search