ebs cleanup.js - SaltwaterC/sysadmin-tools GitHub Wiki
Usage mode
It uses the same settings file as ebs-auto-snapshot.js:
- it has the same dependencies
- you may use the same IAM policy
Therefore, if you already use the ebs-auto-snapshot.js script, this script works out of the box.
Notes
This script is useful only if you delete an EC2 machine that had EBS volumes attached, and those volumes have existing snapshots which are now orphaned. It won't delete snapshots of your existing volumes, or snapshots that were used for creating an AMI.
Take it as warning: it deletes all the snapshots that don't fit the above exceptions.