Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save florin-andrei-curbside/519584408725f8b8dc5dc6d009263c91 to your computer and use it in GitHub Desktop.
Save florin-andrei-curbside/519584408725f8b8dc5dc6d009263c91 to your computer and use it in GitHub Desktop.
run a command in all AWS EC2 regions in your account
#!/usr/bin/env bash
for reg in `aws ec2 describe-regions --query 'Regions[].[RegionName]' --output=text`; do
echo $reg
# do something
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment