S3 bucket contents cleanup over 365 day old

0

I'm following steps here https://repost.aws/knowledge-center/s3-empty-bucket-lifecycle-rule# but instead of using 1 for the days I'm using 365. I want to confirm that on step 14 Create a second lifecycle rule, Delete expired delete markers or incomplete multipart uploads and Delete expired object delete markers, it will only delete what was marked in the 365 day lifecycle rule created earlier.

DDAS
asked 9 months ago233 views
1 Answer
2
Accepted Answer

Delete expired object delete markers or incomplete multipart uploads : You can only select Delete incomplete multipart uploads but not Delete expired object delete markers, when Expire current versions of objects rule is selected.

Delete incomplete multipart uploads: This action will stop all incomplete multipart uploads, and the parts associated with the multipart upload will be deleted

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.

Expire current version of objects will add the delete marker and the current version of an object is retained as a noncurrent version. For non-versioned buckets, Amazon S3 permanently removes the object. Please refer Expiring objects documentation

So to conclude this, in your case, current version of object would be expired in 365 days through rule Expire current versions of objects but you would not want to keep non-current version of objects for another 365 days, 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:

Hope you find this helpful.

Comment here if you hav additional questions, happy to help.

Abhishek

profile pictureAWS
EXPERT
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
  • Do you have any additional questions, happy to help.

  • Thanks for responding to my question so quickly. I read up a little more on what is a delete marker and I'm pretty confident now that it will only affect the files that were marked for deletion and nothing else. Thanks for posting your answer.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions