Is there a way I can use s3's object lifecycle to prune through current versioned objects and delete those objects premantely that have a deleted marker on them in lets say a month or a week? If there isn't, how is house cleaning performed on versioned buckets?
To delete the object, select the object, and choose delete and confirm your choice by typing delete in the text field. On, Amazon S3 will permanently delete the object version. Select the object version that you want to delete, and choose delete and confirm your choice by typing permanently delete in the text field.
Object Expiration allows you to schedule removal of your objects after a defined time period.
S3 Object Lock can help prevent accidental or inappropriate deletion of data. For example, you could use S3 Object Lock to help protect your AWS CloudTrail logs.
This page describes object lifecycle management generically. This page describes lifecycle configuration more specifically.
You cannot do precisely what you want with S3's built-in lifecycle. With the versioning feature, there are two types of objects: the current version, and old non-current versions. The current version is the latest, most recently uploaded version of your object. For now, if the latest thing you've done to an object is cover it with a delete-marker, treat the delete-marker as the current version.
With S3's lifecycle, you can set up a rule to permanently delete non-current versions after X days. (You can also set up rules to move to glacier after X days.) But it sounds like what you're asking is for a rule where you can permanently delete non-current-but-only-if-the-current-is-a-delete-marker. This isn't natively supported.
If you want to only delete objects whose current version is a delete marker, you'll have to write your own listing agent to walk your bucket, enumerate these objects, and delete them yourself. There might be existing tools for this already; I haven't checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With