Hi All, this document deals with how to extract ec2 instances details to CSV file.
There is a certain case you need to get the ec2 instances to detail to some reporting purposes. Right now AWS doesn’t have any option of reporting facility in their web interface but aws CLI does have this option. So here We will show extract instances details using aws cli.
Step 1: Install the aws CLI.
Step 2: Configure aws cli, for this execute the below command and enter the following details,
Aws access key
AWS secret key
if you don’t have these key please go through this link https://www.techrunnr.com/how-to-set-up-access-and-secret-key-in-aws-iam/ .
if you don’t know the region code, go through this link https://www.techrunnr.com/aws-region-names-and-corresponding-region-codes/.
Step 3: Now execute the below command to extract the instances details of the region which you have mentioned in the step 2.
Step 4: Wait for the above statement to complete. Now you can see a new file has been created named ec2_instance_details.csv. If you open the file, all the details instances are available.
© 2019, Techrunnr. All rights reserved.