How to delete lot of objects named with common prefix from S3 bucket?

For anyone who stumbles upon this now, you can create a lifecycle rule to either delete or set expiration of files with a certain prefix.


There's no way to tell S3 to delete all files that meet a specific criteria - you have to delete one key at a time.

Most client libraries offer a way to filter and paginate such that you'd only list the files you need to delete and you can provide a status update. For an example, Boto's bucket listing accepts prefix as one of the parameters.

Tags:

Amazon S3