title: How to display ec2 instances details from multiple regions using single command, in my case from us-east-1 and us-west-1?
body: <p>I am trying to get instance-id, availability zone, instance status, instance name(from tags) of ec2 instances hosted in us-east-1 and us-west-1 region in a single AWS CLI command so that I can export the output in an excel file.</p>
  
  <p>I can get the output from one region at a time using the below commands but couldn't find a way to get the output from two regions using one single command.</p>
  
  <pre><code>aws ec2 describe-instances --region us-east-1 --query Reservations[].Instances[].{ID:InstanceId,State:State.Name,AZ:Placement.AvailabilityZone,TagName:Tags[0].Value} --output text&gt;C:\Users\PiyushVermaVerma\Desktop\testfile.xls
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>aws ec2 describe-instances --region us-west-1 --query Reservations[].Instances[].[InstanceId,Tags[0].Value,Placement.AvailabilityZone,State.Name] --output text&gt;C:\Users\PiyushVermaVerma\Desktop\testfile.xls
  </code></pre>