Courseiva
Network DesignhardMultiple SelectObjective-mapped

Two Steps to Enable Internet Access from Private Subnets via NAT Gateway

A company has a VPC with public and private subnets. The public subnet contains a NAT gateway and a bastion host. The private subnet contains application servers. The company wants to ensure that the application servers can download patches from the internet. Which TWO steps should be taken to allow this while maintaining security? (Choose two.)

Quick Answer

The correct answer is to add a route in the private subnet route table that points 0.0.0.0/0 to the NAT gateway and to allow outbound HTTPS traffic in the security group associated with the application servers. This works because the NAT gateway, residing in a public subnet with an internet gateway, translates the private IPs of the application servers to its own elastic IP for outbound traffic, while the security group acts as a stateful firewall to permit only the necessary HTTPS connections for patch downloads. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding of how to combine network address translation with security group egress rules to enable private subnet internet access via NAT gateway with security group and route table configurations, a common trap being that students forget to update the security group’s outbound rules or mistakenly point the route to an internet gateway. A helpful memory tip is “NAT for the path, SG for the pass”—the route table provides the path out, and the security group passes only the required traffic.

⚠ Common exam trap

AWS often tests the distinction between where routes are added (public vs. private subnet route tables) and the role of security groups versus network ACLs, leading candidates to incorrectly modify the public subnet's route table or use overly permissive network ACL rules.

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

Allow outbound HTTPS (port 443) traffic from the application servers in the security group

The application servers need to initiate outbound HTTPS connections (port 443) to download patches from the internet. By allowing outbound HTTPS traffic in the security group associated with the application servers, you permit the necessary traffic while maintaining stateful filtering and restricting other outbound traffic. This is a security best practice that follows the principle of least privilege.

Answer analysis

Option-by-option breakdown

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

  • Allow outbound HTTPS (port 443) traffic from the application servers in the security group

    Why this is correct

    Correct; security groups must allow outbound traffic.

  • Modify the network ACL of the private subnet to allow all outbound traffic

    Why it's wrong here

    Incorrect; while NACLs can be used, the question asks for two steps, and this is less specific.

  • Add a route in the public subnet route table that points 0.0.0.0/0 to the NAT gateway

    Why it's wrong here

    Incorrect; public subnet route should point to internet gateway.

  • Add a route in the private subnet route table that points 0.0.0.0/0 to the NAT gateway

    Why this is correct

    Correct; this routes outbound traffic through the NAT gateway.

  • Associate an Elastic IP address with the NAT gateway

    Why it's wrong here

    Incorrect; this is a configuration step but not directly needed for the application servers' access.

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 public subnet containing a NAT gateway and a private subnet containing Amazon EC2 instances. The instances in the private subnet need to download patches from the internet. The NAT gateway is in the public subnet and has an Elastic IP address. The private subnet's route table has a default route pointing to the NAT gateway. However, the instances cannot reach the internet. What is the MOST likely cause?

medium
  • A.The public subnet's route table does not have a route to an internet gateway.
  • B.The NAT gateway does not have a route back to the private subnet.
  • C.The NAT gateway is not associated with a security group that allows inbound internet traffic.
  • D.The security group attached to the EC2 instances does not allow outbound traffic to the internet.

Why A: The NAT gateway resides in the public subnet, but for it to route traffic to the internet, the public subnet's route table must have a default route (0.0.0.0/0) pointing to an internet gateway (IGW). Without this route, the NAT gateway cannot forward traffic from the private subnet to the internet, even though the private subnet's route table correctly points to the NAT gateway. The missing IGW route in the public subnet breaks the outbound path.

Variation 2. A company is deploying a VPC with public and private subnets. They need to provide internet access to instances in the private subnets for software updates. Which THREE components are required to achieve this?

easy
  • A.Route table in the private subnet with a default route pointing to the NAT Gateway
  • B.AWS Site-to-Site VPN connection
  • C.NAT Gateway in a public subnet
  • D.Internet Gateway attached to the VPC
  • E.AWS Direct Connect connection

Why A: A route table in the private subnet with a default route (0.0.0.0/0) pointing to a NAT Gateway ensures that outbound traffic from private instances destined for the internet is forwarded to the NAT Gateway. This allows instances in private subnets to initiate outbound connections for software updates while preventing any unsolicited inbound traffic from the internet.

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.