Created
August 9, 2021 03:36
-
-
Save myugan/a075717d19839b0fd7ac3c5893896c7a to your computer and use it in GitHub Desktop.
Get the lists of public EBS snapshots and filter by description
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
#!/bin/bash | |
keyword="any_description_here" | |
regions=( us-east-1 us-east-2 us-west-1 us-west-2 ap-south-1 ap-northeast-3 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-northeast-1 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 eu-south-1 ) | |
for i in "${regions[@]}" | |
do | |
echo -n "Region: ${i}" | |
aws ec2 describe-snapshots --region ${i} --filters "Name=description,Values=$keyword" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment