Created
April 5, 2021 21:30
-
-
Save hatchcanon/459ba4eaadbd6f8983581a92cdd9eaeb to your computer and use it in GitHub Desktop.
bulk delete multiple AWS snapshots using AWS CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file="filewithsnapshotids.txt" | |
cat $file | tr -d '\r' | while read -r line; | |
do | |
aws ec2 delete-snapshot --snapshot-id $line | |
echo "Deleting snapshot $line" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks exactly what I needed!