title: AWS CLI: How to achieve certain output format for describe-instances?
body: <p>I'm trying to pull a list of all of our instances formatted like so:</p>
  
  <p><code>Tag:Name.Value instance-id private-ip-address</code></p>
  
  <p>This is the command I'm using:</p>
  
  <pre><code>aws ec2 describe-instances --query 'Reservations[*].Instances[*].[Tags[?Key==`Name`].Value[],InstanceId,PrivateIpAddress]' --output text
  </code></pre>
  
  <p>And this is what I'm getting as output:</p>
  
  <pre><code>instance-id private-ip-address
  tag:name.value
  </code></pre>
  
  <p>Even though I've got the Tag bit before everything else, it still lists on a new line below the corresponding ID/IP.</p>
  
  <p>Any way to fix this? Also any way to retrieve a format like this:</p>
  
  <p><code>Tag:name.value,instance-id,private-ip-address</code></p>
  
  <p>Thanks</p>