Traffic is being rejected somewhere in your VPC. How do you use VPC Flow Logs to find out where?
IntermediateScenarioVPC & Cloud Network Design
Answer
Situation read → Flow logs show ACCEPT or REJECT decisions at the ENI level, which separates security group and NACL drops from other issues.
What I'd do →
- Enable flow logs on the VPC or ENI to CloudWatch Logs or S3
- Query with Athena or CloudWatch Insights for
action = "REJECT"and the target IP and port - Read the line:
2 123456789012 eni-0abc 10.0.1.5 10.0.2.9 51234 5432 6 10 840 1700000000 1700000060 REJECT OK - Check whether the rejection came on the inbound ENI (SG or NACL) and whether the return leg is also rejected (NACL, since SGs are stateful)
Why → Flow logs record per-ENI decisions, so you can pin the drop to a specific hop.
Interview tip → Say flow logs do not show payload and are delayed by minutes, so you pair them with tcpdump for deep dives.
More on VPC & Cloud Network Design
What makes a subnet public versus private in AWS?BeginnerExplain internet gateway versus NAT gateway and when you use each.BeginnerPrivate instances need to pull packages from the internet but must not be reachable from it. What do you set up?BeginnerWhy shouldn't production run in the default VPC?BeginnerPublic IP, Elastic IP and private IP: how do they differ on EC2?BeginnerWhy use SSM Session Manager instead of a bastion host?Beginner