I want to apply a deletion rule to my whole bucket to delete all objects that are older than 2 weeks. But my bucket has certain folders that need to be skipped. So is it possible via S3 lifecycle management to skip certain folders and delete rest of the stuff that is older than 2 weeks?
Here is my current bucket structure
- example-bucket.com
- folder 1
- images
- 1. jpg
- videos
- 1.mp4
- 2.flv
- folder 2
- images
- 1.jpg
- folder 3
- videos
- 1.mp4
- folder 4 (Should not be deleted)
- content
- folders
- folder 5
- images
- 1. jpg
- videos
- 1.mp4
- 2.flv
- folder 6 (Should not be deleted)
- content
- folders
I want to skip folder 4 and 6 and want to delete stuff in all other folders that are 14 days old.
Can someone tell me if its possible via AWS S3 Lifecycle management?