1

I have a S3 bucket which is version enabled, I want to permanently delete all the delete marked version objects from the S3 bucket using lifecycle rule.

Which of the below options we need to choose, in order to permanently delete the versions of the objects.

enter image description here

And also the delete marked objects may also be current version.

Raj
  • 125
  • 2
  • 2
  • 14
  • Do you want to delete delete markers or non current version objects? – Jatin Mehrotra Feb 15 '23 at 06:10
  • I want to delete non current versions of object and also after a object is deleted, it will be delete marked and not used further. I want to delete that as well. – Raj Feb 15 '23 at 07:16
  • The policy will ask you after how many days you want to delete non current version of object or markers. – Jatin Mehrotra Feb 15 '23 at 08:43
  • yes, I had tested one option i.e 'Permanently delete noncurrent versions of objects' and I have mentioned as 1 day. I have created the rule 2 days ago. still I can see the versioned objects – Raj Feb 15 '23 at 08:46
  • Do you also want to make current object as non current or you already have non current versions>? – Jatin Mehrotra Feb 15 '23 at 08:48
  • The scenario is, the objects has been already deleted, and there is no current version. I want to permanently delete these noncurrent versions – Raj Feb 15 '23 at 08:51
  • Posted a solution, it will solve your purpose. – Jatin Mehrotra Feb 15 '23 at 08:52
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/251882/discussion-between-raj-and-jatin-mehrotra). – Raj Feb 15 '23 at 08:57

1 Answers1

1

Let's understand what is non current version and current version?

Whenever versioned bucket object is deleted current object version becomes noncurrent, and the delete marker becomes the current version.

what is expired delete marker?

A delete marker with zero noncurrent versions is referred to as an expired object delete marker.

So option 4 and 5 will solve your purpose

  • option 4 will permananelty delete non current objects, which will make delete marker as expired since there will no non current version
  • option 5 will delete expired delete markers

Note: Lifecycle rule policies takes time to take effect as objects are queued and it happens in an asynchronous manner.

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67