SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Networking and Content Delivery

AWS Network Troubleshooting: VPC Flow Logs and the Layered Diagnosis Method

22 min readSOA-C03 · Networking and Content DeliveryUpdated

Troubleshooting AWS network connectivity means working a fixed, layered checklist — route tables, security groups, network ACLs, gateway and endpoint state, then DNS — until you find the control that is dropping or misdirecting packets, and then proving it with the right log or analysis tool. Task 5.3 of the SOA-C03 exam tests exactly this discipline: given a symptom like "the instance can't reach the internet" or "the tunnel is up but nothing flows", you must name the misconfigured component and its fix. This lesson teaches the method, then applies it to the classic failures — zonal and regional NAT gateways and port exhaustion, ephemeral-port NACL traps, security group references across peering, one-sided peering routes, transit gateway route tables and return paths — and shows you how to read the evidence: VPC Flow Log signatures and custom fields, Reachability Analyzer, ELB access log fields, AWS WAF and CloudFront logs, and the three CloudWatch network monitoring services (Network Synthetic Monitor, Network Flow Monitor and Internet Monitor) that version 1.1 of the guide added. Learn the signatures, not just the service names.

What you’ll learn

  • Apply the layered checklist — route table, security group, NACL, gateway state, DNS — to any VPC connectivity failure, and know which traffic NACLs never filter.
  • Fix internet egress for zonal and regional NAT gateways and IPv6 egress-only gateways, and remediate NAT port exhaustion from its CloudWatch metrics.
  • Diagnose stateless NACL failures and host-level drops from VPC Flow Log records, including custom fields such as pkt-srcaddr and pkt-dstaddr behind a NAT gateway.
  • Trace missing paths across peering connections and transit gateway route tables (including the return path), and choose between Reachability Analyzer and Network Access Analyzer.
  • Isolate faults between load balancer, AWS WAF, CloudFront and application tiers using each service's logs and fields.
  • Remediate low CloudFront cache hit ratios with cache policies, origin request policies, aligned TTLs and versioned object names.
  • Troubleshoot Site-to-Site VPN, VPC endpoint and PrivateLink failures, and pick the right CloudWatch network monitoring service for a hybrid, in-AWS or internet path.

The 10 parts · about 17 min of reading

  1. The layered checklistStart hereCheck routes, security groups, NACLs, gateways and DNS in order, and trace every path forward and back for stateless return traffic.1 min
  2. No internet accessNo internet usually means a missing route, a missing public IP, or a NAT gateway without a way out; ports and idle timeouts matter too.3 min
  3. Two instances can't talkConfirm real security group membership, spot the ACCEPT-then-REJECT NACL signature, and know where group references stop working.2 min
  4. Peering and transit gatewayPeering and transit gateway failures are usually missing return routes; TGW drop metrics tell a no-route gap from a blackhole.2 min
  5. Reachability Analyzer and Network Access AnalyzerReachability Analyzer names the component blocking one path without sending packets; Network Access Analyzer audits all paths.1 min
  6. Reading VPC Flow LogsRead ACCEPT and REJECT patterns, treat a missing record as an upstream problem, and use custom fields to see through NAT.2 min
  7. Which log answers which questionELB logs separate balancer from target, WAF logs name the blocking rule, CloudFront logs show hits, and app logs come last.2 min
  8. CloudFront caching issuesA low hit ratio comes from a too-broad cache key, near-zero TTLs or routine invalidations; check Miss versus Error before tuning.2 min
  9. Hybrid and private connectivitySeparate VPN tunnel-down from tunnel-up-no-traffic, then diagnose endpoints by private DNS, security groups, policies and routes.1 min
  10. CloudWatch network monitoringSynthetic Monitor probes hybrid links, Network Flow Monitor measures TCP between workloads, and Internet Monitor watches users.1 min

Mind map

Routes, SGs, NACLs, gateways, then DNSTrace forward and back for NACLrepliesNACLs never filter Resolver ormetadataOS firewall and app come last1✓The layered checklistZonal NAT must sit in a public subnetIGW needs a public IP on the instance55,000 connections per destination perIPIdle connections dropped after 350secondsIPv6 outbound only: egress-only IGW2✓No internet accessCheck the real security groupmembershipACCEPT then REJECT on one ENI = NACLNo group references over inter-RegionpeeringCross-account peer: account-id/sg-id3✓Two instances cannot talkPeering routes on both sides, notransitVPC tables need static routes to theTGWReply uses the destination attachmenttableNoRoute vs Blackhole drop metrics4✓Peering and transitgatewayReachability Analyzer names theblockerStatic analysis: sends no packetsBlind to OS firewall and listenersNetwork Access Analyzer audits a scope5✓Reachability toolsInbound REJECT: SG first, then NACLNo record: problem is upstreamACCEPT does not prove the app got itpkt-dstaddr reveals instance behindNAT6✓Reading VPC Flow LogsELB logs: elb vs target status code502 with "-": target keep-alive tooshortWAF ruleGroupList names the exact ruleWAF log names start aws-waf-logs-7✓Which log answers whatKey only on values that vary theresponseForward-only values: origin requestpolicyMiss is caching; Error is originhealthVersioned names over routineinvalidations8✓CloudFront cache hitratioTunnel down: PSK, IP, UDP 500/4500Tunnel up: propagation and securitygroupsPublic IP from endpoint: enableprivate DNSGateway endpoint needs route tableassociation9✓VPN and endpoint failuresSynthetic Monitor: probes toon-premisesFlow Monitor: agents, TCP inside AWSInternet Monitor: users by city andISP10✓CloudWatch networkmonitorsTroubleshooting VPCconnectivity
Mind map

AWS Network Troubleshooting: VPC Flow Logs and the Layered Diagnosis Method

Routes, SGs, NACLs, gateways, then DNSTrace forward and back for NACLrepliesNACLs never filter Resolver ormetadataOS firewall and app come last1✓The layered checklistZonal NAT must sit in a public subnetIGW needs a public IP on the instance55,000 connections per destination perIPIdle connections dropped after 350secondsIPv6 outbound only: egress-only IGW2✓No internet accessCheck the real security groupmembershipACCEPT then REJECT on one ENI = NACLNo group references over inter-RegionpeeringCross-account peer: account-id/sg-id3✓Two instances cannot talkPeering routes on both sides, notransitVPC tables need static routes to theTGWReply uses the destination attachmenttableNoRoute vs Blackhole drop metrics4✓Peering and transitgatewayReachability Analyzer names theblockerStatic analysis: sends no packetsBlind to OS firewall and listenersNetwork Access Analyzer audits a scope5✓Reachability toolsInbound REJECT: SG first, then NACLNo record: problem is upstreamACCEPT does not prove the app got itpkt-dstaddr reveals instance behindNAT6✓Reading VPC Flow LogsELB logs: elb vs target status code502 with "-": target keep-alive tooshortWAF ruleGroupList names the exact ruleWAF log names start aws-waf-logs-7✓Which log answers whatKey only on values that vary theresponseForward-only values: origin requestpolicyMiss is caching; Error is originhealthVersioned names over routineinvalidations8✓CloudFront cache hitratioTunnel down: PSK, IP, UDP 500/4500Tunnel up: propagation and securitygroupsPublic IP from endpoint: enableprivate DNSGateway endpoint needs route tableassociation9✓VPN and endpoint failuresSynthetic Monitor: probes toon-premisesFlow Monitor: agents, TCP inside AWSInternet Monitor: users by city andISP10✓CloudWatch networkmonitorsTroubleshooting VPCconnectivity

How the exam tests this

Expect scenario questions that hand you a symptom and evidence, and demand the one misconfigured component or the right tool. "ACCEPT inbound but REJECT on the return traffic" points at a stateless network ACL missing ephemeral-port rules; no flow-log record at all points at routing or DNS; an ACCEPT with a client timeout and a clean Reachability Analyzer result points at the host. NAT questions turn on zonal-versus-regional placement and on reading ErrorPortAllocation and IdleTimeoutCount; transit gateway questions on association versus propagation, the return-path table and NoRoute versus Blackhole drops. Log questions test field-level knowledge: pkt-dstaddr behind a NAT gateway, terminatingRuleId versus ruleGroupList in WAF logs, target_status_code in ALB access logs. Caching questions separate the cache policy from the origin request policy, and monitoring questions separate Network Synthetic Monitor, Network Flow Monitor and Internet Monitor by where the problem sits.

Key takeaways

  1. Security groups are stateful; network ACLs are stateless — a rejected reply to an accepted request is always a NACL problem.
  2. Network ACLs never filter Route 53 Resolver (VPC+2), instance metadata, DHCP or Amazon Time Sync traffic.
  3. A zonal NAT gateway must sit in a public subnet with an IGW route; a regional NAT gateway needs no public subnet and has its own route table.
  4. NAT port exhaustion (ErrorPortAllocation): add secondary IPs (55,000 connections per destination per IP) or spread clients across more NAT gateways; idle connections drop after 350 seconds.
  5. ACCEPT in a flow log means only that the SG and NACL allowed the packet — an OS-firewall drop or a reset from a closed port is still ACCEPT.
  6. Behind a NAT gateway, the original destination is in pkt-dstaddr on the instance-to-NAT leg; the translated leg never shows the instance.
  7. Peering is non-transitive, needs static routes on both sides and has no propagation; transit gateway replies use the destination attachment's route table.
  8. Reachability Analyzer traces one path and names the blocker; Network Access Analyzer audits for unintended access.
  9. WAF rule-group blocks: terminatingRuleId names the group, ruleGroupList names the rule; ALB 502 with target status '-' means the target's keep-alive timeout is shorter than the LB idle timeout.
  10. Low CloudFront hit ratio: move non-varying values to an origin request policy, align TTLs, version object names; Origin Shield and longer max TTLs don't fix a fragmented key.
  11. Hybrid probes: Network Synthetic Monitor; in-AWS workload flows: Network Flow Monitor; end users' ISPs and cities: Internet Monitor.
  12. VPN tunnel up but no traffic: check routes (static routes or BGP propagation on the route table) first, then security groups allowing the on-premises CIDR.
0/10
Ready to start

Part 1: The layered checklist

Check routes, security groups, NACLs, gateways and DNS in order, and trace every path forward and back for stateless return traffic.

1 min read · 10 parts, about 17 min in allStart lesson

Frequently asked questions

How do I tell whether a security group or a network ACL is blocking traffic?

Use statefulness. Security groups are stateful: if they accept a request, the reply is automatically allowed, so they can never block only the return traffic. Network ACLs are stateless and evaluate the reply as a new packet. So in VPC Flow Logs, an ACCEPT record for the request followed by a REJECT record for the reply on the same ENI proves a NACL is at fault — usually a missing outbound rule for ephemeral ports 1024-65535. A REJECT on the inbound request itself could be either control; check the security group's inbound rules first, then the subnet's NACL.

Why can't my private-subnet instance reach the internet through the NAT gateway?

Check in order. First, the private subnet's route table must send 0.0.0.0/0 to the NAT gateway. Second, if it is a zonal NAT gateway, it must have been created in a public subnet — one whose route table sends 0.0.0.0/0 to an internet gateway; a zonal NAT gateway in a private subnet is Available but has no path out. (A regional NAT gateway needs no public subnet; it has its own route table with an internet gateway route.) Third, confirm security groups and NACLs allow the outbound traffic and its ephemeral-port return. If only some connections fail under load, check ErrorPortAllocation for port exhaustion — fixed by adding secondary IP addresses or more NAT gateways — and if long idle connections drop, remember the 350-second idle timeout.

What does it mean when there is no VPC flow log record for my traffic at all?

The packets never reached the network interface, so no security rule ever evaluated them. The failure is upstream: a missing or wrong route table entry, DNS resolving to a different IP than you expect, or controls on the source side. Before concluding that, remember flow logs intentionally exclude some traffic — Amazon DNS resolver queries, instance metadata requests to 169.254.169.254, and DHCP — and check the log-status field, since SKIPDATA means records were dropped during the aggregation window.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?