Kostas Demiris
Kostas Demiris

Reputation: 3621

How to create an S3 lifecycle policy that deletes an object and its previous versions?

On application level , app-user marks S3 objects as deleted [sets delete marker].

The bucket is versioning-enabled.

I want to retain the marked as deleted object and all it's versions for 30 days and then delete all of them.

Is the following lifecycle policy correct?

enter image description here

Upvotes: 2

Views: 2417

Answers (1)

TJCloudmin
TJCloudmin

Reputation: 165

Yes, you have the correct settings to only delete versions after 30 days. On the previous page in the S3 console you can choose the prefix under which to delete the previous versions, or the whole bucket.

I use http://www.insight4storage.com/ from AWS Marketplace to lower my costs by tracking my AWS S3 storage usage trends by prefix, bucket or storage class over time; plus it shows me the previous versions storage by prefix and per bucket.

Upvotes: 0

Related Questions