Created
August 14, 2012 06:09
-
-
Save sullust/3346810 to your computer and use it in GitHub Desktop.
EC2 Snapshots whose AMI has been deleted
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
echo "AMI's from snapshots which no longer exist"; | |
echo "----------------------------------"; | |
for i in `aws describe-snapshots | grep -o "ami-\([0-9]\|[a-z]\)\+" | sort -u`; do | |
if [[ -n `aws dim $i | grep requestId` ]]; then | |
echo "$i"; else echo ""; | |
fi; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment