How to delete or purge old files on S3?

前端 未结 5 1803
盖世英雄少女心
盖世英雄少女心 2020-12-24 10:21

Are there existing solutions to delete any files older than x days?

5条回答
  •  没有蜡笔的小新
    2020-12-24 10:56

    You can use AWS S3 Life cycle rules to expire the files and delete them. All you have to do is select the bucket, click on "Add lifecycle rules" button and configure it and AWS will take care of them for you.

    You can refer the below blog post from Joe for step by step instructions. It's quite simple actually:

    https://www.joe0.com/2017/05/24/amazon-s3-how-to-delete-files-older-than-x-days/

    Hope it helps!

提交回复
热议问题