跳至内容

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

已提问 2 年前274 查看次数
1 回答
1
已接受的回答

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
专家
已回答 2 年前
专家
已审核 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。