跳至內容

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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。