Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't delete directory from Amazon S3

I'm using the web interface of Amazon's S3, and when I right-click a folder X and choose Delete, X seems to be deleted. Then when I refresh the interface, X may either disappear or remain; if I keep clicking refresh, the folder is either missing or present. Is this a bug, or am I doing something wrong? The folder is still present, as far as I can tell; one of my EMR jobs complains that the output folder X still exists.

like image 650
verve Avatar asked Mar 26 '14 16:03

verve


People also ask

How do I delete a folder from my AWS S3?

In the Buckets list, choose the name of the bucket that you want to delete folders from. In the Objects list, select the check box next to the folders and objects that you want to delete. Choose Delete.

Why can't I delete my S3 bucket?

Short description. You can't delete an S3 bucket using the Amazon S3 console if the bucket contains 100,000 or more objects. You can't delete an S3 bucket using the AWS CLI if versioning is enabled. For more information, see Deleting or emptying a bucket.

How do I force delete a S3 bucket?

Using the S3 consoleSign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, select the option next to the name of the bucket that you want to delete, and then choose Delete at the top of the page.


2 Answers

I had the same problem in the AWS web interface after AWS Command Line (CLI)-deleting a "recursive" folder in a bucket. Some objects randomly reappeared (not files, but in fact "folders") in the web interface. Even though i tried to delete these folders in the web interface, they were still there (The interface said the operation was successful...)

Solution that worked for me in the AWS web interface: Right clicked the folder -> CUT, and PASTE into another folder. Worked great, and then deleted the new folder. Gone!

like image 55
Kristoffer Berg - EcodeAS Avatar answered Sep 28 '22 04:09

Kristoffer Berg - EcodeAS


Tried the same as Kristoffer's answer, but CUT/PASTE to another folder made the new folder to not be deletable.

Further hacking: create a new temporary bucket. CUT/PASTE the folder to this bucket and delete the bucket.

like image 34
Zanon Avatar answered Sep 28 '22 03:09

Zanon