How to get pdf for ec2 servers list

0

Hello,

In billing page there is a option "print". you can choose this and save as pdf format.

Likewise, how to get the pdf for ec2 servers.

Thanks, Ragav

asked 21 days ago96 views
1 Answer
1
Accepted Answer

Hello.

I don't think there is an option to obtain a PDF list of EC2 from the management console as of May 2024.
Therefore, you will need to create a program to obtain the CSV using AWS CLI, etc., as shown below, or to obtain the EC2 list using boto3, etc., and save it as a PDF.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.htm

aws ec2 describe-instances \
    --query "Reservations[].Instances[].{InstanceId:InstanceId, InstanceType:InstanceType, State:State.Name, Name: Tags[?Key==\`Name\`].Value, LaunchTime:LaunchTime}" \
    --output json | 
    jq -r ".[] | [.Name[0], .InstanceId, .InstanceType, .State, .LaunchTime] | @csv" > ec2-info.csv
profile picture
EXPERT
answered 21 days ago
profile picture
EXPERT
reviewed 21 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions