I have a windows instance running Windows Server 2019 and after stopping and starting the instance, I cannot connect to it SSM or RDP. When I run aws ec2 get-console-output returns the instance id and timestamp only:
{
"InstanceId": "i-07dd6exxxxxxxxd1",
"Timestamp": "2022-04-11T18:25:04+00:00"
}
If I try to execute ssm start session, it times out and returns:
Command '['session-manager-plugin', '{"SessionId": "oscars@blank.com-0473707d8049c843c", "TokenValue": "", "StreamUrl": "wss://ssmmessages.eu-west-1.amazonaws.com/v1/data-channel/oscars@blank.com-0473707d8049c843c?role=publish_subscribe&cell-number=", "ResponseMetadata": {"RequestId": "f44033cc-12da-4617-81ad-195e17ef2e69", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Mon, 11 Apr 2022 18:06:58 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "839", "connection": "keep-alive", "x-amzn-requestid": "f44033cc-12da-4617-81ad-195e17ef2e69"}, "RetryAttempts": 0}}', 'eu-west-1', 'StartSession', 'prod', '{"Target": "i-07dd6exxxxxxxxd1"}', 'https://ssm.eu-west-1.amazonaws.com']' returned non-zero exit status 3221225786.
Starting an RDP session returns a timeout even though Reachability Analyzer states that the instance is reachable via TCP on port 3389 from another instance. Basically the instance has become unreachable and I can only stop and start it in the console.
Have you tried these troubleshooting pages -
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/screenshot-service.html
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/troubleshoot-connect-windows-instance.html