Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Folder won't delete on Amazon S3

I'm trying to delete a folder created as a result of a MapReduce job. Other files in the bucket delete just fine, but this folder won't delete. When I try to delete it from the console, the progress bar next to its status just stays at 0. Have made multiple attempts, including with logout/login in between.

like image 628
bgcode Avatar asked Mar 23 '12 05:03

bgcode


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?

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 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.


1 Answers

I had the same issue and used AWS CLI to fix it:

aws s3 rm s3://<your-bucket>/<your-folder-to-delete>/ --recursive ;

(this assumes you have run aws configure and aws s3 ls s3://<your-bucket>/ already works)

like image 88
sonjz Avatar answered Oct 14 '22 13:10

sonjz