0

Can we query multiple AWS regions at the same time?.

I want to query for data from multiple AWS regions through AWS CLI, for example, all the EC2 instances active in every region.

gvasquez
  • 1,919
  • 5
  • 27
  • 41
npandey
  • 11
  • 1
  • 2
  • 5

1 Answers1

8

No there is no way to set multiple regions in one setting. You could do something like this

for region in `aws ec2 describe-regions --output text | cut -f3`
do
     echo -e "\nListing Instances in region:'$region'..."
     aws ec2 describe-instances --region $region
done
Colwin
  • 2,655
  • 3
  • 25
  • 25