I have an S3 bucket which will not remove expired object delete markers.
The bucket is:
The Lifecycle Rule I have set (attached picture below):
I went through and deleted (using the UI EDIT: and the lifecycle rule) a bunch of objects, and I was able to verify that the Life Cycle rule did permanently remove the original objects after the interval of 1 day, but their delete markers (which are now technically expired object delete markers) have remained. It has been 5 days and the delete markers still remain. Is there anything further I need to do in order for the delete markers to be permanently removed as well?
It turns out that the answer to this is: patience. The lifecycle rule DID eventually clean up the expired object delete markers.
I had deleted ~100TB worth of data, so it generated quite a bit of expired object delete markers - so it took AWS > 1 week to kick in and remove them. After receiving customer support - they mentioned some things that were helpful in understanding this, emphasis mine:
it should be noted that Lifecycle can take some time to actually expire the object or delete marker even though it marks them as eligible and puts them in queue. So, although S3 stops charging once the objects are marked for expiration, they may continue to exist till Lifecycle gets to actually expire them. Additionally, this duration is also affected by the overall load on Lifecycle service for that particular AWS region.
That being said, please note that S3 Lifecycle will eventually expire/transition the eligible objects, however it doesn't have a fixed SLA to be relied upon. In most of the use cases, this is normal and acceptable. Whereas for use case that needs timely clean up of delete markers, it's better to have some other process that synchronously deletes these delete markers rather than waiting for Lifecycle to eventually clean them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With