I'm scheduled automatic creation EBS Snapshots using CloudWatch
How to schedule automatic deleting old snapshots?
AWS: how to schedule deleting EBS Snapshots after 1 week?
968 views Asked by Artik At
2
There are 2 answers
0
On
You can take snapshots and put tags like "DeleteOn:" on those snapshots.
Write another lambda which read snapshots on basis of this tag and delete it on that particular date. There is detailed on this in botocore Doc: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html
This might be of help. It's a Python program I wrote that takes snapshots of all volumes and keeps the last 2 snapshots.
You could run a program like this on an EC2 instance, or convert it to run as a scheduled AWS Lambda function.