AWS EC2 Cannot Connect
When an EC2 instance is unreachable, separate the problem into address → network path → security controls → host → service.
Diagnose
- Confirm the expected hostname/IP, port, and protocol.
- Check EC2 instance and system status checks.
- Verify the subnet route table and expected internet, NAT, VPN, or private connectivity path.
- Inspect security groups and network ACLs.
- Check the operating-system firewall and target service.
- Compare a working instance in the same path.
Fix → Verify → Prevent
Fix only the layer supported by evidence. After the change, reconnect and confirm the application itself responds. Prevent recurrence with least-privilege rules, health checks, and a short connectivity runbook.
Related: architecture, cloud concepts.