How do I troubleshoot Remote Desktop connection issues to my Amazon EC2 Windows instance?
Last updated: 2021-06-25
I can't connect to my Amazon Elastic Compute Cloud (Amazon EC2) Windows instance with Remote Desktop Protocol (RDP). How can I fix this?
Troubleshoot the error message "An internal error occurred"
If you receive the RDP error message "An internal error occurred", then see Step: 1 Check the RDP port on the Microsoft website.
Troubleshoot using an instance screenshot
You can view an instance screenshot for visibility into the instance's status. If the screenshot indicates that the instance OS boots successfully but fails instance status checks, then complete the following steps:
Verify that you're using the correct IP address
If the instance is in a subnet that uses an AWS NAT Gateway, make sure that you're connecting to the instance's private IP address. The instance is unreachable on the public IP address behind the AWS NAT Gateway.
Verify that port 3389 isn't blocked
Verify that port 3389 isn't blocked by your AWS security group, Network ACL, OS firewall, or antivirus software.
Confirm you're using the correct firewall and network configuration
1. Open a PowerShell window from your local device, and then run the following command:
Test-NetConnection -ComputerName yourdomain.exampleco.com -Port 3389
2. In the output of the preceding command, verify that TcpTestSucceeded is True. This indicates that the EC2 instance is responding over the network and you can reach the required RDP port. For more information, see Test-NetConnection on the Microsoft website.
If the preceding steps don't resolve the issue, use the AWSSupport-TroubleshootRDP automation document with AWS Systems Manager to troubleshoot and fix common RDP-related connection issues. You can run the automation document without installing the SSM agent on your instance. Also, the instance doesn't need to be managed by AWS Systems Manager to run the automation document.
For manual troubleshooting steps, see Remote Desktop can't connect to the remote computer.