s3nukem is a slightly improved version of s3nuke, a Ruby script by Steve Eley that relatively quickly deletes an Amazon Web Services (AWS) Simple Storage Service (S3) bucket with many objects (millions) by using multiple threads to retrieve and delete the individual objects.
Improvements include:
- The key retrieval thread will pause when the queue contains
1000 * thread_count
items. The original script’s queue would grow unabated, eating up memory unnecessarily. - All output is automatically flushed, which ensures you can keep an eye on progress in real-time.
- Added the number of seconds elapsed since the start of the script to the output so you can calculate the rate at which items are being deleted.