Skip to content

Instantly share code, notes, and snippets.

@carnal0wnage
Created May 15, 2020 21:32
Show Gist options
  • Save carnal0wnage/255f26c95205881319e66ddf24cfc0ac to your computer and use it in GitHub Desktop.
Save carnal0wnage/255f26c95205881319e66ddf24cfc0ac to your computer and use it in GitHub Desktop.
shell script to list public snapshots for an owner for all regions
OWNER='XXXXXXXXX'
echo $OWNER
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing Snapshots for owner in region:'$region'..."
aws ec2 describe-snapshots --owner-ids=$OWNER --region $region
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment