Monday, January 2, 2012

Removing non-empty buckets from Amazon S3

I had an old bucket in S3 made by Jungle Disk aeons ago (about 3 years), when it was free and using S3. It contained thousands of files, some backups I used to make, and later abandoned. So I wanted to delete the bucket, in order not to continue paying the $ 0.02 rent every month. But, alas, you can only delete empty buckets on S3. And you can only delete 7-8 files at a time using Amazon's web interface. So I started looking around (i.e. googling), and came across s3cmd. Very nice and simple to use, and installable via macports, too. It has a recursive delete option, exactly what I needed. Let it run for about an hour (yes, many files to delete), and voila: the bucket was empty, and easily removable.
Optional listen while waiting: "My Bucket's Got a Hole in It".

No comments:

Post a Comment