I find it strange that after looking everywhere I don't find any tool to delete all the versions of a file older than X days (not the actual file) of a S3 bucket that has versioning enabled. I would believe this is a very common issue because without it the buckets with time would become huge.
Is there any existing solution (even commercial)?
If there is no ready made way, could you point me to some info or give me suggestions on how to code this myself in C#? I guess I have to use recursion for this kind of problem.
Thanks
If you use the amazon s3 API, you can do that. I use AmazonS3Client + DeleteObjectRequest method on amazon SDK:
http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Client.html
http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/DeleteObjectRequest.html
Should really be straightforward.
Hope it helps
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