aws ec2 get-password-data
Retrieves the encrypted administrator password for a running Windows instance. AWS CLI reference
2 examples 2 options Its page in the AWS CLI reference
Examples
Example 1: To get the encrypted password
The following get-password-data example gets the encrypted password.
aws ec2 get-password-data --instance-id i-1234567890abcdef0Identify--instance-idThe ID of the Windows instance.Its output
{
"InstanceId": "i-1234567890abcdef0",
"Timestamp": "2013-08-07T22:18:38.000Z",
"PasswordData": "gSlJFq+VpcZXqy+iktxMF6NyxQ4qCrT4+gaOuNOenX1MmgXPTj7XEXAMPLEUQ+YeFfb+L1U4C4AKv652Ux1iRB3CPTYP7WmU3TUnhsuBd+p6LVk7T2lKUml6OXbk6WPW1VYYm/TRPB1e1DQ7PY4an/DgZT4mwcpRFigzhniQgDDeO1InvSDcwoUTwNs0Y1S8ouri2W4n5GNlriM3Q0AnNVelVz/53TkDtxbNoU606M1gK9zUWSxqEgwvbV2j8c5rP0WCuaMWSFl4ziDu4bd7q+4RSyi8NUsVWnKZ4aEZffuDPGzKrF5yLlf3etP2L4ZR6CvG7K1hx7VKOQVN32Dajw=="
}For more information, see Connect to your Windows instance using RDP in the Amazon EC2 User Guide.
Example 2: To get the decrypted password
The following get-password-data example gets the decrypted password.
aws ec2 get-password-data --instance-id i-1234567890abcdef0 --priv-launch-key C:\Keys\MyKeyPair.pemIdentify--instance-idThe ID of the Windows instance.Its output
{
"InstanceId": "i-1234567890abcdef0",
"Timestamp": "2013-08-30T23:18:05.000Z",
"PasswordData": "&ViJ652e*u"
}For more information, see Connect to your Windows instance using RDP in the Amazon EC2 User Guide.
Options
--dry-runChecks whether you have the required permissions for the operation, without actually making the request, and provides an error response.--instance-idThe ID of the Windows instance.