title: AWS CLI export volume information to CSV with instance name
body: <p>From Windows 10 AWS CLI, I've been able to successfully export EBS volume information to a .csv with the following command:</p>
  <pre><code>aws ec2 describe-volumes –-query &quot;Volumes[*].[Attachments[0].VolumeId,AvailabilityZone,Attachments[0].InstanceId,Attachments[0].State,Size]&quot; --output text &gt; volumes.csv
  </code></pre>
  <p>I would like to know how to make two modifications: changing the instance ID to the instance name, and adding sortable columns to the .csv.</p>
  <p>I've tried using 'InstanceName' and 'Name' in place of InstanceId but these seem to be invalid, as the CLI returns 'None' in this column when I know the instances do have names.</p>
  <p>As far as adding columns automatically, no clue here</p>
  <p>Edit: Also interested in adding whether the volume is encrypted or not to the query...I could not find this in AWSCLI docs.</p>