Courseiva
Network Management and OperationshardMultiple ChoiceObjective-mapped

NAT Gateway Connectivity Troubleshooting: Using CloudWatch Metrics

A company is using a centralized egress VPC model with a NAT gateway for outbound traffic from multiple VPCs. The network team notices that some EC2 instances are having connectivity timeouts when accessing the internet. The team has verified the route tables and security groups. Which additional check should be performed to troubleshoot the issue?

Quick Answer

The answer is to check the NAT Gateway CloudWatch metrics for error packets and connection counts. This is correct because in a centralized egress VPC model, multiple VPCs funnel outbound traffic through a single NAT gateway, which can exhaust its 65,535 ephemeral ports per IP address. When port allocation fails, the `ErrorPortAllocation` metric spikes and `PacketsDropCount` rises, causing connectivity timeouts even when route tables and security groups are properly configured. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding of NAT gateway scalability limits and CloudWatch monitoring as a diagnostic tool—a common trap is assuming the issue is always a routing or security group misconfiguration. Remember that NAT gateway port exhaustion is a silent killer in centralized egress designs, so always correlate timeout symptoms with `ErrorPortAllocation` and `ActiveConnectionCount` metrics. Memory tip: “Ports drop, packets stop—check the error count at the top.”

⚠ Common exam trap

AWS often tests the misconception that VPC Flow Logs or security group checks are sufficient for diagnosing NAT Gateway issues, when in fact the root cause is often port exhaustion or packet drops at the NAT Gateway itself, which requires CloudWatch metrics to identify.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Check the NAT gateway CloudWatch metrics for error packets and connection counts

NAT Gateway CloudWatch metrics, specifically `ErrorPortAllocation` and `PacketsDropCount`, directly indicate whether the NAT Gateway is running out of available ports or dropping packets due to connection limits. In a centralized egress model with multiple VPCs, high connection counts can exhaust the NAT Gateway's ephemeral port capacity (65,535 per IP), causing connectivity timeouts even when route tables and security groups are correctly configured.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Check the security group rules for outbound traffic

    Why it's wrong here

    Security groups already verified.

  • Check the VPC Flow Logs for denied traffic

    Why it's wrong here

    Flow Logs show allowed/denied, but timeouts suggest resource issue.

  • Check the route tables for the internet gateway

    Why it's wrong here

    Route tables already verified.

  • Check the NAT gateway CloudWatch metrics for error packets and connection counts

    Why this is correct

    High connection counts or error packets indicate resource exhaustion.

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

About these practice questions

Courseiva writes every ANS-C01 question from scratch — 1,621 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on ANS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company has a VPC with a CIDR of 10.0.0.0/16. They have two subnets: 10.0.1.0/24 (public) and 10.0.2.0/24 (private). An EC2 instance in the private subnet needs to download patches from the internet. The team creates a NAT gateway in the public subnet and updates the private subnet route table to route 0.0.0.0/0 to the NAT gateway. The EC2 instance still cannot reach the internet. The team confirms the NAT gateway has an elastic IP and the public subnet has an internet gateway. What is the MOST likely cause?

easy
  • A.The private subnet route table does not have a route for the NAT gateway's IP.
  • B.The network ACL for the private subnet denies outbound traffic to the internet.
  • C.The public subnet does not have a route to the internet gateway.
  • D.The NAT gateway does not have source/destination check disabled.

Why B: The most likely cause is that the network ACL (NACL) for the private subnet denies outbound traffic to the internet. Even though the route table correctly points 0.0.0.0/0 to the NAT gateway, the NACL is a stateless firewall that can block outbound traffic if it doesn't allow the necessary ephemeral ports. It must also allow inbound return traffic. Option A is incorrect because the private subnet route table already has a route to the NAT gateway. Option C is incorrect because the public subnet already has a route to the internet gateway. Option D is incorrect because the NAT gateway is a managed service with source/destination check automatically disabled.

Variation 2. A company uses AWS CloudFormation to deploy a VPC with public and private subnets. The template includes an Internet Gateway and a NAT Gateway. After deployment, instances in the private subnet cannot access the internet. The network engineer checks the route tables and finds that the private subnet route table has a default route pointing to the NAT Gateway. What is the most likely cause of the issue?

hard
  • A.The NAT Gateway is deployed in the private subnet instead of the public subnet.
  • B.The security group attached to the NAT Gateway blocks outbound traffic.
  • C.The private subnet route table does not have a default route (0.0.0.0/0) to the NAT Gateway.
  • D.The NAT Gateway is in a private subnet and has no route to the internet gateway.

Why A: The NAT Gateway must be deployed in a public subnet with a route to the Internet Gateway. If it is in a private subnet, it cannot reach the internet, so instances in the private subnet cannot use it for outbound traffic. Option B is incorrect because security groups by default allow outbound traffic. Option C is incorrect because the question states the private subnet route table has a default route pointing to the NAT Gateway. Option D is incorrect because while the NAT Gateway being in a private subnet and lacking a route to the IGW is a related issue, the most direct cause is that the NAT Gateway itself is in the wrong subnet, as stated in option A.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This ANS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ANS-C01 exam.