Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I'm currently working on migrating the file backup system for my office to Amazon S3. The basic backup is working like a charm but I'm looking to make it a little more robust. Specifically I am looking to add version control for the files in the bucket (using Amazon "Versioning") but there is no mention (that I can find) of a way to limit the number of old versions stashed per file (ie: "File x" has a maximum of 5 previous versions at any given time).

Is it possible to place limits on the number of versions stored per file? Or am I stuck with an unlimited propagation of file versions over time if I go this route?

I've been digging through the AWS forums (as well as anywhere else I look) and have yet to find anything. Any info would be greatly appreciated. Thanks!

1 Answer

0 votes
by (44.4k points)

You can certainly create and maintain a Lifecycle for your S3 bucket which will work on time, such as deleted older versions after 10 days.

You can use NoncurrentVersionTransition to transition the old version to a different storage class, and you can use NoncurrentVersionExpiration to finally delete an old revision.

https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

Browse Categories

...