mercredi 24 juin 2015

How do I unlock or delete an AWS S3 bucket that inadvertently locked with a bucket policy?

I am the AWS account owner, admin (both IAM and root password - not recommended I know, but have some legacy apps that depend on root pw). I recently added a bucket policy which has subsequently rendered the bucket locked an inaccessible to me:

$ aws s3 rb http://s3<my-bucket> --force
A client error (AccessDenied) occurred when calling the ListObjects operation:   Access Denied
Completed 1 part(s) with ... file(s) remaining
remove_bucket failed: http://s3<my-bucket>/ A client error (AccessDenied) occurred when calling the DeleteBucket operation: Access Denied

I've tried both the CLI and the AWS S3 console, but only receive the error: Sorry! You do not have permissions to view this bucket.

It's a small relief that this bucket is completely empty, but I need to use this particular name and am stuck as I cannot do anything with it.

I'm hoping I'm not the only one who has experienced this dilemma.

(P.S. - I'd post the EXACT bucket policy I used, but I created it using the console and, if I entered some part of it incorrectly as I suspect, I can't get at it to copy/paste it here for you...)

Kind regards, Jeff.




Aucun commentaire:

Enregistrer un commentaire