This repo contains two NodeJS lambda functions used to schedule snapshots of tagged EBS volumes and delete snapshots that are older than their expiry date.
Configure Terraform to point to your desired AWS Account.
Run terraform plan && terraform apply
in the /terraform directory. This will setup CloudWatch Scheduled Events, Targets, and Roles for running the Lambda functions.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
v1.0 - Basic implementation
- Allow configurable backup schedule
- CloudWatch Scheduled Event will still run hourly, but will only back up based on Tag
{ "Backup":"hourly/daily/monthly" }
.
- CloudWatch Scheduled Event will still run hourly, but will only back up based on Tag
- Set
{ "Snapshot_Retention":"<time (in hours)>" }
on EBS Volume and persist toRetention
tag on Snapshot.
- Shoutout to @steve-Jansen for always pushing me to be better.