Deleting a S3 bucket with DENY all policies on it

0

I created a S3 bucket with DENY all policies on it while learning CDK (with the help of some very bad genAI advice). Now I can't do anything to the bucket, everything returns:

An error occurred (AccessDenied) when calling the <operation> operation: User: <me> is not authorized to perform: s3:<action> on resource: "arn:aws:s3:::<bucket>" with an explicit deny in a resource-based policy

I have Administrator permissions, and I granted myself s3:* just to make sure I wasn't missing anything. Actions I've tried include get-bucket-policies, set-bucket-policies, delete-bucket-policy, plus trying to delete the contents, remove the bucket, or even just list the bucket contents. The only thing I can do is list buckets with the bucket name as the prefix.

Any suggestions on how I can get rid of this bucket? I tried logging in as root for the account and that didn't help at all.

asked 2 months ago75 views
2 Answers
0
Accepted Answer
profile pictureAWS
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile picture
EXPERT
reviewed 2 months ago
0

Ah, that was it, thank you -- I had looked around while logged in as root, but hadn't noticed that policy there. Thank you!

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions