Why can't I connect to my EC2 instance?
Last updated: 2021-09-29
I'm getting an error when trying to connect to my Amazon Elastic Compute Cloud (Amazon EC2) instance? Why can't I connect to my EC2 instance?
Resolution
Prerequisites
To connect to your EC2 instance, complete the following prerequisites:
- Verify that the security group attached to your instance allows access to port 22 for Linux and port 3389 for Windows.
- Verify that your network access control list (ACL) allows access to the instance.
- Verify that your routing table has a route for the connection.
Troubleshooting
If the preceding prerequisites are met and you can't connect to the instance, do the following:
1. Verify that your EC2 instance is passing status checks. For more information. see the following:
- Why is my EC2 Linux instance unreachable and failing one or both of its status checks?
- Why is my EC2 Windows instance down with an instance status check failure?
- Why is my EC2 Windows instance down with a system status check failure or status check 0/2?
2. If your instance passed the status checks and you're getting connection errors on your instance when trying to connect, see the following:
Related information
Did this article help?
Do you need billing or technical support?