How to delete 1 month old and older files in s3 using aws-cli?


My bucket has already a lot of files and I want to delete files which are 1 month old and older.
I would like o delete files with out setting a Object Expiration.

Is there any way to do this using aws-cli? Thanks 🙂


Found a blog post that contains a script that should take care of your needs.

More versatile version can be found here

Leave a Reply