Skip to content

Instantly share code, notes, and snippets.

@bfrancom
Created May 30, 2022 22:03
Show Gist options
  • Save bfrancom/c0f380b332ba03fe8e85cdb44f08d4e1 to your computer and use it in GitHub Desktop.
Save bfrancom/c0f380b332ba03fe8e85cdb44f08d4e1 to your computer and use it in GitHub Desktop.
AWS CLI Get EC2 Info and Export to CSV
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,State.Name,InstanceType'] |jq -r '.[][] | @csv' >>/tmp/ec2.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment