Error connecting to your instance: Connection timed out
This is one of most common error which we use to get when you try to connect your AWS EC2 cloud instance.
“Network error: Connection timed out
or Error connecting to [instance], reason: -> Connection timed out: "
The reason could be from below any one
- First Check your security group rules . Inbound and Outbound required ports are open .
- If it is linux instance check ssh port 22 , and for windows rdp 3389 port open
- Check the required network range are properly allowed in security group rules . For Ex if your accessing from on-premise and through VPN to AWS instance , your subnet or IP entries mentioned in route table and security group properly Ex10.120.0.0/16
- Check your on-premise subnet or IP is match with the entry made in security group using ipconfig/ifconfig
- Check your AWS instance running in private or public subnet in AWS VPC. If it is public subnet internet gateway must be attached to the subnet.
- If your computer is on a corporate network, ask your network administrator whether the internal firewall allows inbound and outbound traffic from your computer on port 22 (for Linux instances) or port 3389 (for Windows instances).
- If you have a firewall on your computer, verify that it allows inbound and outbound traffic from your computer on port 22 (for Linux instances) or port 3389 (for Windows instances).
- Check that your instance has a public IPv4 address. If not, you can associate an Elastic IP address with your instance
- Check the CPU load on your instance; the server may be overloaded. AWS automatically provides data such as Amazon CloudWatch metrics and instance status, which you can use to see how much CPU load is on your instance
Well if you still have connecting to your instance , the chance is less . You can open a support case with AWS, sometimes issue with NIC card may be , they may switch your instance to another hardware . Thanks!