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?

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