- A
Deploy a NAT Gateway in a public subnet and add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT Gateway.
This allows outbound internet traffic from the private subnet while blocking inbound unsolicited traffic.
- B
Deploy a NAT Gateway in the private subnet and route the private subnet traffic through it.
Why wrong: A NAT Gateway in a private subnet cannot communicate with the internet; it must be in a public subnet.
- C
Attach an Internet Gateway to the VPC and route the private subnet traffic through it.
Why wrong: An Internet Gateway would allow inbound traffic from the internet, which is not desired.
- D
Deploy a proxy server in the private subnet and configure the web servers to use it.
Why wrong: A proxy server can work but is more complex and requires additional management; a NAT Gateway is simpler and native.
Quick Answer
The correct choice is to deploy a NAT Gateway in a public subnet and add a route in the private subnet’s route table pointing 0.0.0.0/0 to the NAT Gateway. This configuration works because the NAT Gateway, residing in a public subnet with an Internet Gateway, translates private IPs to its own public IP for outbound traffic while dropping any unsolicited inbound connections, thereby providing secure outbound internet access from a private subnet. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding of VPC routing and NAT fundamentals, often appearing as a straightforward design question where the trap is confusing a NAT Gateway with a proxy or placing it in a private subnet. A common memory tip: “NAT in public, route in private—outbound only, no inbound invited.”
ANS-C01 Network Security, Compliance and Governance Practice Question
This ANS-C01 practice question tests your understanding of network security, compliance and governance. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company is designing a VPC with private subnets for databases and public subnets for web servers. They need to allow the web servers to make outbound internet requests for software updates but prevent inbound traffic from the internet. Which configuration should they use?
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
Deploy a NAT Gateway in a public subnet and add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT Gateway.
Option C is correct because a NAT Gateway in a public subnet allows outbound internet traffic from private subnets while blocking unsolicited inbound traffic. Option A is wrong because an Internet Gateway alone would allow inbound traffic. Option B is wrong because a NAT Gateway in a private subnet cannot access the internet. Option D is wrong because a proxy in a public subnet could work but is more complex and not the simplest solution.
Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Deploy a NAT Gateway in a public subnet and add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT Gateway.
Why this is correct
This allows outbound internet traffic from the private subnet while blocking inbound unsolicited traffic.
Related concept
CIDR notation defines the prefix length.
- ✗
Deploy a NAT Gateway in the private subnet and route the private subnet traffic through it.
- ✗
Attach an Internet Gateway to the VPC and route the private subnet traffic through it.
Why it's wrong here
An Internet Gateway would allow inbound traffic from the internet, which is not desired.
- ✗
Deploy a proxy server in the private subnet and configure the web servers to use it.
Common exam traps
Common exam trap: usable hosts are not the same as total addresses
Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.
Detailed technical explanation
How to think about this question
Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.
KKey Concepts to Remember
- CIDR notation defines the prefix length.
- Block size helps identify subnet boundaries.
- Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
- The required host count determines the smallest suitable subnet.
TExam Day Tips
- Write the block size before choosing the subnet.
- Check whether the question asks for hosts, subnets or a specific address range.
- Do not confuse /24, /25, /26 and /27 host counts.
Key takeaway
Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.
- →
Network Security, Compliance and Governance — study guide chapter
Learn the concepts, then practise the questions
- →
Network Security, Compliance and Governance practice questions
Targeted practice on this topic area only
- →
All ANS-C01 questions
1,705 questions across all exam domains
- →
AWS Certified Advanced Networking Specialty ANS-C01 study guide
Full concept coverage aligned to exam objectives
- →
ANS-C01 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related ANS-C01 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Network Management and Operations practice questions
Practise ANS-C01 questions linked to Network Management and Operations.
Network Security, Compliance and Governance practice questions
Practise ANS-C01 questions linked to Network Security, Compliance and Governance.
Network Design practice questions
Practise ANS-C01 questions linked to Network Design.
Network Implementation practice questions
Practise ANS-C01 questions linked to Network Implementation.
ANS-C01 fundamentals practice questions
Practise ANS-C01 questions linked to ANS-C01 fundamentals.
ANS-C01 scenario practice questions
Practise ANS-C01 questions linked to ANS-C01 scenario.
ANS-C01 troubleshooting practice questions
Practise ANS-C01 questions linked to ANS-C01 troubleshooting.
Practice this exam
Start a free ANS-C01 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this ANS-C01 question test?
Network Security, Compliance and Governance — This question tests Network Security, Compliance and Governance — CIDR notation defines the prefix length..
What is the correct answer to this question?
The correct answer is: Deploy a NAT Gateway in a public subnet and add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT Gateway. — Option C is correct because a NAT Gateway in a public subnet allows outbound internet traffic from private subnets while blocking unsolicited inbound traffic. Option A is wrong because an Internet Gateway alone would allow inbound traffic. Option B is wrong because a NAT Gateway in a private subnet cannot access the internet. Option D is wrong because a proxy in a public subnet could work but is more complex and not the simplest solution.
What should I do if I get this ANS-C01 question wrong?
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.
What is the key concept behind this question?
CIDR notation defines the prefix length.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
5 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 deployed a VPC with public and private subnets. They have an Internet Gateway attached to the VPC and a NAT Gateway in the public subnet. The private subnet instances need to download patches from the internet. Which configuration ensures that the private instances can reach the internet while preventing inbound traffic from the internet?
easy- A.Add a VPC Gateway Endpoint for Amazon S3 to the private subnet route table.
- B.Add a route in the private subnet route table pointing 0.0.0.0/0 to the Internet Gateway.
- ✓ C.Add a route in the private subnet route table pointing 0.0.0.0/0 to the NAT Gateway.
- D.Create a VPC Peering connection to a public VPC and route traffic through it.
Why C: Option A is correct because a route to the NAT Gateway allows outbound traffic to the internet, and the NAT Gateway does not allow inbound traffic initiated from the internet. Option B is wrong because an Internet Gateway would allow inbound traffic. Option C is wrong because a VPC Gateway Endpoint is for specific AWS services like S3 and DynamoDB, not general internet access. Option D is wrong because a VPC Peering connection does not provide internet access.
Variation 2. A security engineer is designing a VPC with public and private subnets. The company requires that all outbound traffic from private subnets to the internet must go through a single IP address for logging and compliance. Which service should be used?
easy- A.Transit Gateway
- B.Internet Gateway
- ✓ C.NAT Gateway
- D.VPC Endpoint
Why C: Option A is correct because a NAT Gateway provides outbound internet access from private subnets with a single Elastic IP. Option B is wrong because an Internet Gateway allows inbound and outbound traffic from public subnets. Option C is wrong because a VPC Endpoint is for accessing AWS services privately. Option D is wrong because a Transit Gateway is for connecting multiple VPCs and on-premises networks.
Variation 3. A security engineer is designing a VPC with public and private subnets. The company requires that instances in the private subnet can initiate outbound connections to the internet but cannot receive inbound connections from the internet. Which TWO components are necessary? (Choose 2)
hard- A.VPC Gateway Endpoint for S3
- B.Security group allowing inbound traffic from 0.0.0.0/0
- ✓ C.NAT Gateway in the public subnet
- D.Internet Gateway attached to the private subnet
- ✓ E.Route in the private subnet route table pointing to the NAT Gateway
Why C: Options A and D are correct. A NAT Gateway in the public subnet allows outbound internet access. A route in the private subnet's route table pointing to the NAT Gateway enables this. Option B is wrong because an Internet Gateway is attached to the VPC, not the private subnet. Option C is wrong because a VPC Gateway Endpoint is for AWS services, not internet. Option E is wrong because a security group can allow inbound but the requirement is to not allow inbound; a NAT Gateway already ensures no inbound.
Variation 4. A company is designing a VPC with public and private subnets. They need to allow instances in the private subnet to access the internet for software updates while preventing inbound internet traffic. Which AWS service should they use?
medium- ✓ A.NAT Gateway
- B.AWS Direct Connect
- C.VPC Peering
- D.Internet Gateway
Why A: Option B is correct because a NAT Gateway allows outbound internet traffic from private subnets while blocking inbound traffic. Option A (Internet Gateway) would allow inbound traffic. Option C (VPC Peering) does not provide internet access. Option D (Direct Connect) is a dedicated connection, not for internet access.
Variation 5. A company is designing a VPC with a public subnet for web servers and a private subnet for database servers. The web servers must be able to access the internet for software updates, but the database servers must not have direct internet access. Which solution meets these requirements?
easy- A.Use a VPC endpoint for Amazon S3 to provide internet access to the database servers.
- ✓ B.Deploy a NAT gateway in the public subnet and add a route to it in the private subnet's route table.
- C.Set up a VPN connection to an on-premises data center and route traffic through it.
- D.Attach an internet gateway to the VPC and add a route to it in the private subnet's route table.
Why B: Option B is correct because a NAT gateway in a public subnet allows instances in private subnets to initiate outbound traffic to the internet while preventing inbound traffic from the internet. Option A is incorrect because an internet gateway in the private subnet would allow direct inbound traffic. Option C is incorrect because a VPC endpoint is for accessing AWS services privately, not for general internet access. Option D is incorrect because a VPN connection does not provide internet access.
Last reviewed: Jun 20, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.