使用 EC2 CLI 创建实例后如何显示密码?

How to show the password after creating an instance using EC2 CLI?

我运行下面的命令从现有的 AMI 创建实例:

'ec2-run-instances ami-e1***** --name "INSTANCE_NAME" -t t1.micro --aws-access-key %AWS_ACCESS_KEY% --aws-secret-key %AWS_SECRET_KEY%'

EC2 CLI创建实例后如何显示实例密码?

假设 windows 实例:

aws ec2 get-password-data --instance-id <your-windows-instance-id>

GetPasswordData

Retrieves the encrypted administrator password for an instance running Windows