How do you debug "why can't A reach B" in a VPC?
IntermediateConceptVPC and Networking
Answer
Use VPC Reachability Analyzer: it models the configuration (route tables, SGs, NACLs, endpoints, TGW) between a source and destination and tells you the blocking component. Then confirm with Flow Logs (REJECT entries) and nc -zv host port from the instance.
aws ec2 create-network-insights-path --source eni-0a --destination eni-0b \
--protocol tcp --destination-port 5432
aws ec2 start-network-insights-analysis --network-insights-path-id nip-0abc
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner