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
已提问 9 个月前241 查看次数
1 回答
2
已接受的回答

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
专家
已回答 9 个月前
profile picture
专家
已审核 9 个月前
  • 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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则