I'm aware of get-password-data
command which can display PasswordData data like:
$ aws ec2 get-password-data --instance-id i-0123456789
{
"InstanceId": "i-0123456789",
"PasswordData": "\r\nAOh...xg==\r\n",
"Timestamp": "2018-03-27T16:52:04.000Z"
}
however I'd like to know which Key pair name was used to launch the instance, so I can pass it using --priv-launch-key
in order to decrypt the password.