- Newest
- Most votes
- Most comments
It'd be really helpful, if you could add a snapshot of your lifecycle policy.
Delete expired object delete markers: You cannot enable Delete expired object delete markers if you enable Expire current versions of objects. This action is not available when "Expire current versions of objects" is selected.
Current version of object would be expired in 'n' days through rule Expire current versions of objects but you would not want to keep non-current version of objects there for longer duration, so based on your requirement I'd suggest you to add days in the rule Permanently delete noncurrent versions of objects accordingly, like how many days you want to keep noncurrent version objects to stay there. If you want to keep noncurrent version for 1 day then enter day value as 1 for this rule.
Additional Reference:
-
How to setup Lifecycle rule for S3 noncurrent version of objects
-
Reduce storage costs with fewer noncurrent versions using Amazon S3 Lifecycle
Hope you find this helpful.
It also depends on the mode that has been selected for Object Lock.
If you are using Compliance, the objects are locked until the expiration date and cannot be shortened or change the mode.
If the objects are locked via Governance mode, the changes (overwrite / lock settings) can be made by user with special permissions. Those users can perform a version specific delete request on the non-current versions and delete markers.
Hello, Our Object lock settings are currently set to the following
"Object Lock Enabled
Default retention Automatically protect new objects put into this bucket from being deleted or overwritten. Enabled
Default retention mode Compliance
Default retention period 100 days"
Relevant content
- asked 2 years ago
- asked 8 months ago
- asked 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
Thank you for your reply, Anything with the "Delete marker" is a non current version correct? So i could set this at 30 days after its marked and it would be removed?
Here is a link to an image of how i have the life cycle configured currently. https://send.tresorit.com/a#fDLn2FKOwwa1g8qbf7kLTw
Thank you
Noncurrent version Object: Whenever a new version of an existing object is uploaded in a version enabled bucket, all versions of this object except just uploaded one, would be noncurrent versions of object. Delete marker is a different topic, an object would have delete marker, if we delete the object in a version enabled bucket, that deleted object would still be there but with delete marker. Please refer delete marker documentation which I added in my answer.
Here are some other useful blogs/re:Post article:
How to setup Lifecycle rule for S3 noncurrent version of objects
Reduce storage costs with fewer noncurrent versions using Amazon S3 Lifecycle
I've included these artifacts in my answer as well.
Feel free to comment here, happy to help further.
Ok thank you, Will lifecycle rules delete the objects within the bucket while Object lock is enabled after the retention period has passed? With the lifecycle rule set to 60 days, all non current objects have a delete marker will be permanently deleted from the bucket. is this correct?
Sorry Austin for delayed response. That's a great question, no lifecycle policy won't delete the objects with object lock enabled(compliance mode) however as that object lock expires and if that objects fall under lifecycle rule expiration, it'd then expire. But in Governance mode, this can be changed. No, non current object won't necessarily have delete marker. As I mentioned earlier, suppose I uploaded an object 'a.txt', then I updated this file at local and uploaded again to s3 same location, now if S3 bucket is version enabled then previously uploaded 'a.txt' would be non-current version of object 'a.txt' but it won't have delete marker. Delete marker gets attached to an object, when you delete the object. Now with the same example, after uploading updated 'a.txt', you have two versions, one is current and one noncurrent, if you now delete this 'a.txt', then a delete marker would be attached with a.txt.
Hope this explains and provide you the clarity. Please feel free to comment here if you have further questions, happy to help.
Do you have any additional questions, happy to help?