user2543623
user2543623

Reputation: 1562

What is the trick to delete an AWS S3 bucket?

Trying to delete a S3 bucket in AWS via the webpage but nothing happens -- no error message, no popup, nothing. The delete screen has a standard "Type the name of the bucket to confirm deletion" message and I did type it (yes, I'm 100% sure I spelled it correctly, I've tried copy-paste, etc) but when I hit the Confirm button nothing happens. No error message, and the delete screen doesn't go away, etc. Nothing happens.

On many guis, the "Confirm" button would be grayed out or change color once you successfully type the thing to be deleted, but that's not happening here -- the button appears clickable even before I type anything; but clicking it doesn't do anything either before I type my bucket or after.

Here's a screenshot (I scribbled out part of the name because that has my personal info; but I'm sure I'm typing it correctly). Is there a trick I have to do to delete this? enter image description here

UPDATE: I tried creating a new different bucket and then was able to delete that with no problem. But I still can't delete this one. I think maybe this bucket is somehow in-use or orphaned or something but I can't find any trace of it being used anywhere else in the AWS console and there's no error message (or any action at all) when I click the confirm button, so I don't know why AWS is refusing to do anything. How can I 100% force nuke this bucket away?

FURTHER UPDATE: Clicking on that bucket on the webpage says "Error Data not found" which makes me think something got orphaned here. But the bucket is still showing up, so how can I force delete it?

enter image description here

Upvotes: 2

Views: 2837

Answers (2)

user2543623
user2543623

Reputation: 1562

This appears to be a delay on Amazon's side. I waited for the next day and then the bucket disappeared on its own. So I guess Amazon's cache just had to refresh or something.

Upvotes: 1

Rafaqat Ali
Rafaqat Ali

Reputation: 718

Make sure your bucket is empty and no policy is associated with it.

Also, This is what had worked for me. I didn't have versioning enabled on the bucket. When you delete an object from the s3 bucket, it puts a 'delete marker' on that object and hides it from the listing. When you click the 'show' version button you will see your deleted objects with the delete marker. Select this object (with delete marker) and delete it again. This is a permanent delete. Now your object is really gone and your bucket is really empty. After this, I was able to delete my bucket.

I guess, versioning=true only means that s3 will create versions of the object if you upload with the same name.

Upvotes: 1

Related Questions