Automate the process of listing or deleting AWS EC2 snapshots that aren't linked to any available or pending AMI.
- An AWS Account
- AWS CLI configured with necessary permissions
- Bash environment for executing the script
- Clone this repository or download the script.
git clone https://github.com/arnaud-coral/AWS-Delete-unused-EBS-snapshots
- Navigate to the directory.
cd [directory-name]
- Make the script executable.
chmod +x delete_unused_snapshots.sh
- For dry run mode (lists snapshots without deleting):
./delete_unused_snapshots.sh -d
- For delete mode (deletes the unlinked snapshots):
./delete_unused_snapshots.sh
This script is © 2023 by Arnaud Coral. It's licensed under CC BY-NC-SA 4.0. Please refer to the license for permissions and restrictions.