Delete every 7 days folders on S3 bucket

61 Views Asked by At

How can I create a lifecycle rule that deletes every 7 days folders on the S3 Bucket? I already tried a rule that Expires current versions of objects but they are not being removed.

I checked these 2 options and didn't work:

  • Expire current versions of objects
  • Permanently delete non-current versions of objects

Maybe its better with a Lambda function? How can I do it?

This is how i tried

1

There are 1 best solutions below

2
Harish VA On

Lifecycle rules run once a day at midnight Universal Coordinated Time (UTC). You might need to wait 24 hours after lifecycle rules