ベン・ギルド (Ben Guild)


How to delete all files in an Amazon S3 bucket, easily.

There's a really annoying problem with Amazon S3 (Simple Storage Service), and it's that once you get files there it's equally inconvenient to delete them.

Luckily, finally, there is a way to wipe out an entire bucket of stuff without using any third-party software.

Edit the bucket's properties, and select the “Lifecycle” tab. Create a blank rule, with a 1 day expiration date. A warning will appear when you save, stating that this “blank” rule will apply to all files.

image

Within the time you specify (in our case … 1 day), all items in the bucket will be purged automatically and the bucket can be removed. Phew!