- Newest
- Most votes
- Most comments
Hi Jon
Would the AWS CLI work for you? aws ec2 describe-instances? You can then save it to CSV by adding --output text >> instances.csv
Documentation here: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
Cheers James
Try this aws ec2 describe-instances --query Reservations[*].Instances[*].[InstanceId,InstanceType,PlatformDetails] --output text which would give you the bare bones that you want.
You can use the --output table option to display it as a more aesthetically pleasing table:
aws ec2 describe-instances --query Reservations[*].Instances[*].[InstanceId,InstanceType,PlatformDetails] --output table
Output it as JSON and then add some jq magic and you get CSV output that can more easily be parsed, or imported into a spreadsheet:
aws ec2 describe-instances --query Reservations[*].Instances[*].[InstanceId,InstanceType,PlatformDetails] --output json | jq -r '.[][] | @csv'
I'm not familiar enough with CLI or JSON to perform this task. My primary role is project management, cost management.
Fair enough, in that case I think probably the link in @James-Malcolm's comment is the best way to go.
Relevant content
asked 3 years ago
asked 3 years ago
asked a year ago

I'm not familiar with working in CLI. I reviewed the document, which confused me, and not sure how to proceed. I need to see a complete list of all instances and I'm also looking for more detailed information within them. I noticed several right off the bat were not configured properly. They were not optimized. Rather than one by one through 150+ instances, I hoped to just get a read out or even a full lists that included details like that so I can filter out.
I've not tried this, but perhaps this blog post may help you out? https://www.iocloud.blog/2020/07/03/how-to-export-ec2-instances-to-csv-excel-using-aws-systems-manager-explorer/
Otherwise, the CLI is the easiest way I know to get a list.