Private instances cannot reach the internet; `curl: (28) Connection timed out after 10000 milliseconds`.
IntermediateTroubleshootingVPC and Connectivity
Answer
Likely causes → NAT gateway missing, route absent, or NAT in a subnet without an IGW route.
Diagnose →
aws ec2 describe-nat-gateways --filter Name=vpc-id,Values=vpc-0abc
aws ec2 describe-route-tables --route-table-ids rtb-0abc
aws ec2 describe-subnets --subnet-ids <nat-subnet>
curl -v https://example.com
Fix →
- Create the NAT in a public subnet
- Fix routes
- Check NACL and SG egress
Prevent → Test egress in IaC pipelines.
More on VPC and Connectivity
`ssh: connect to host 3.250.1.1 port 22: Connection timed out`. Walk the checks.Beginner`ssh: connect to host ... port 22: Connection refused`. How is it different from a timeout?Beginner`Permission denied (publickey)` on a new EC2 instance.IntermediateNAT gateway shows `ErrorPortAllocation` in CloudWatch and connections drop.IntermediateVPC peering is `active` but ping fails.IntermediateVPC Reachability Analyzer says `BLACKHOLE`. What does it mean?Advanced