Created
June 17, 2019 18:55
-
-
Save copolycube/0cb4c819e399fbcb545b092502b7d734 to your computer and use it in GitHub Desktop.
Execute code over all AWS regions
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 | |
## oneline : for r in $(aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text --region ca-central-1); do echo "---------- AWS Region : $r ----------" ; echo "hello world"; done | |
for r in $(aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text --region ca-central-1); | |
do | |
echo "---------- AWS Region : $r ----------" ; | |
echo "hello world"; | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notes :
the --region ca-central-1 is not necessary if you defined a default region in your AWS cli configuration; adding it makes it generic.