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:
Any solution? Please :(
You need to login as root account and then delete the policy.
https://repost.aws/knowledge-center/s3-accidentally-denied-access