How to delete all contents/objects of Amazon S3 bucket
If you have an S3 bucket with a huge number of files, and you want to delete the bucket, you need to empty the bucket first. If the bucket has a handful of files, then it is easy enough from the AWS interface, but if the bucket has a large number of files, then AWS interface is not an option; and you must use s3cmd or may be some other tool which allows this.
s3cmd is a command-line tool for manipulating S3 buckets and objects; and as you would expect, it does have a way to recursively delete all objects in a bucket.
It took me a while to figure this out, because it does not seem to be documented, I found this in one of the comments on S3cmd page.
If your bucket contains hundreds of thousands of files, you’d better to use multi-threaded approach. Deleting objects in one thread may take a weeks.
If versioning enabled for the bucket, you will also need delete all versions before deleting the bucket.
S3 Browser Freeware can effectively delete very large amounts of files using multiple threads. It also does support versioned buckets. So, if you have access to Windows machine, give it a try.