An internet gateway connects a VPC to the internet in both directions, so resources in a public subnet with public IP addresses can reach the internet and be reached from it. A NAT gateway lets resources in a private subnet start connections out to the internet, for updates or API calls, while blocking any connection started from the internet. On the exam, “must be reachable from the internet” means an internet gateway and a public subnet, and “private instances need outbound access only” means a NAT gateway.
Facts verified November 2026 against the Amazon VPC User Guide.
Table of Contents
NAT gateway vs internet gateway at a glance
In short: the internet gateway is the VPC’s door to the internet, and the NAT gateway is a one-way exit that private subnets use through that door.
| Internet gateway | NAT gateway | |
|---|---|---|
| Direction | Inbound and outbound | Outbound only: connections must start inside the VPC |
| Used by | Resources in public subnets with public IPv4 (or IPv6) addresses | Resources in private subnets with private IPv4 addresses only |
| Where it lives | Attached to the VPC (one per VPC) | A standard (zonal) NAT gateway sits in a public subnet in one AZ. A regional NAT gateway spans AZs |
| How the route works | Public subnet route: 0.0.0.0/0 → igw-… | Private subnet route: 0.0.0.0/0 → nat-…, and the NAT gateway itself uses the internet gateway |
| Availability and scaling | Horizontally scaled, redundant and highly available by design, with no bandwidth limit | Managed by AWS. Starts at 5 Gbps and scales automatically up to 100 Gbps |
| Cost | No charge for the gateway itself | Hourly charge plus a charge per GB processed (VPC pricing) |
| IPv6 | Supports IPv6 in both directions | For IPv4. For IPv6 outbound-only, use an egress-only internet gateway |
| Security | Doesn’t filter traffic. Security groups and NACLs do | Blocks unsolicited inbound connections, but isn’t a firewall. Security groups and NACLs still apply |
How do the two work together?
A NAT gateway doesn’t replace the internet gateway: it depends on it. The usual design looks like this:
- Public subnet: its route table sends
0.0.0.0/0to the internet gateway. The NAT gateway (and usually a load balancer) lives here. - Private subnet: its route table sends
0.0.0.0/0to the NAT gateway. Application servers and databases live here, with no public IP addresses. - Outbound request: a private instance downloads a patch. The traffic goes to the NAT gateway, which swaps the private source address for its own Elastic IP address and sends it out through the internet gateway. The reply comes back the same way.
- Inbound attempt: someone on the internet tries to connect to the private instance. There’s no public address and no route in, so the connection fails.
Choose an internet gateway when…
- Resources must be reachable from the internet: public web servers, bastion hosts, or a public load balancer.
- IPv6 resources need two-way internet access.
- You’re building any public subnet. A subnet is “public” precisely because its route table points to an internet gateway.
Choose a NAT gateway when…
- Private instances need outbound internet access: operating system updates, third-party APIs, downloading packages.
- The question says these instances must not be reachable from the internet.
- You want a managed, highly available service rather than running and patching your own NAT instance.
High availability: one NAT gateway per AZ, or a regional NAT gateway?
A standard NAT gateway is zonal: it runs in one Availability Zone. If that AZ fails, private subnets in other AZs that route through it lose internet access. The classic exam answer for high availability is to create one NAT gateway in each AZ and point each private subnet’s route table at the NAT gateway in its own AZ. That also avoids cross-AZ data transfer charges.
Since November 2025, AWS also offers regional NAT gateways, which expand automatically across Availability Zones as your workloads spread. Regional mode doesn’t support private NAT, so a private NAT gateway (for connecting to other VPCs or on-premises networks) still has to be zonal. Exam questions written before the launch will still expect the one-per-AZ design, so learn that pattern first.
Exam cues: which answer the question wants
| Cue in the question | Likely answer | Exam |
|---|---|---|
| “Allow the VPC to communicate with the internet” | Internet gateway | CLF-C02 |
| “Web servers must be reachable from the internet” | Public subnet + internet gateway (often behind a load balancer) | SAA-C03 |
| “Instances in a private subnet need to download updates” | NAT gateway in a public subnet + route from the private subnet | SAA-C03, SOA-C03 |
| “…without being accessible from the internet” | NAT gateway (not a public IP) | SAA-C03 |
| “Highly available outbound access across AZs” | One NAT gateway per AZ (or a regional NAT gateway) | SAA-C03, SOA-C03 |
| “IPv6 instances need outbound-only internet access” | Egress-only internet gateway | SAA-C03 |
| “Private instances must reach S3 or DynamoDB without NAT data processing charges” | Gateway VPC endpoint | SAA-C03 |
| “Reduce operational overhead compared with a NAT instance” | NAT gateway | SAA-C03, SOA-C03 |
| “Private instances can’t reach the internet” (troubleshooting) | Check the private route to the NAT, the NAT’s public subnet route to the IGW, and SGs/NACLs | SOA-C03 |
Worked example 1: the patching problem
An application runs on EC2 instances in private subnets across two Availability Zones. The instances must download security patches from the internet, but they must never accept connections from the internet. The solution must stay available if one AZ fails. What should a solutions architect do?
“Download patches” means outbound access, and “never accept connections” rules out giving the instances public IP addresses or moving them to public subnets. That makes NAT the answer. The availability requirement decides how to deploy it: a single NAT gateway is a single point of failure for the whole VPC. The expected design is a NAT gateway in a public subnet in each AZ, with each private subnet’s route table pointing 0.0.0.0/0 to the NAT gateway in the same AZ. Since November 2025, a regional NAT gateway is another way to meet the requirement, but the per-AZ design is the answer most exam questions are written around.
Worked example 2: the unreachable instance
A new instance in a private subnet can’t reach the internet. The private subnet’s route table sends 0.0.0.0/0 to a NAT gateway. The NAT gateway was created in the same private subnet. What is wrong?
Follow the path. The private instance sends traffic to the NAT gateway, which is fine. But the NAT gateway itself then needs a route to an internet gateway, and it’s sitting in a private subnet whose default route points back at the NAT gateway, not at the internet gateway. A public NAT gateway must be created in a public subnet, whose route table sends 0.0.0.0/0 to the internet gateway, and it needs an Elastic IP address. The fix is to create the NAT gateway in a public subnet and update the private route table to point to it.
Common NAT gateway vs internet gateway traps
- “A NAT gateway connects to the internet on its own.” It doesn’t. A public NAT gateway needs an internet gateway in the VPC, and a zonal one must sit in a public subnet.
- Putting a zonal NAT gateway in the private subnet. It goes in a public subnet, and private subnets route to it.
- One zonal NAT gateway shared by every AZ. That’s cheaper, but if its AZ fails, every private subnet loses internet access. Questions about high availability want one per AZ, or a regional NAT gateway.
- Using NAT to reach S3 or DynamoDB. A gateway VPC endpoint is private and avoids NAT data processing charges. It’s the “most cost-effective” answer.
- NAT for IPv6. For outbound-only IPv6, use an egress-only internet gateway, not a NAT gateway.
- Treating a NAT gateway as a firewall. It blocks unsolicited inbound connections, but filtering is the job of security groups and network ACLs.
NAT gateway vs internet gateway FAQ
Does a NAT gateway need an internet gateway?
A public NAT gateway does: it sends traffic out through the VPC’s internet gateway. A private NAT gateway, used to reach other VPCs or on-premises networks, doesn’t.
Can I have more than one internet gateway per VPC?
No. A VPC can have only one internet gateway attached at a time.
Is a NAT gateway free?
No. You pay per hour for each NAT gateway and per GB of data it processes. The internet gateway itself has no charge, though normal data transfer charges apply.
What’s the difference between a NAT gateway and a NAT instance?
A NAT instance is an EC2 instance you configure, patch and scale yourself. A NAT gateway is managed by AWS, scales automatically and is highly available within its AZ. AWS recommends NAT gateways.
What does an egress-only internet gateway do?
It’s the IPv6 equivalent of NAT: it allows outbound IPv6 traffic from your VPC and blocks connections started from the internet.
Test yourself
VPC networking appears throughout SAA-C03 and SOA-C03. Try our free AWS Solutions Architect Associate practice exam, then take a full timed test:
Free mock exam
Take SAA-C03 Mock Exam 1, free
A full-length, timed mock in the real exam format, with every answer explained so you know exactly where you stand.
65
questions
130
minutes
720
to pass
Free account required.
The full set is in our SAA-C03 practice exams.
Read the SAA-C03 exam guide or the SOA-C03 exam guide, or compare storage next in EBS vs EFS.
AWSBoy is not affiliated with Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates.
Sources (checked November 2026): Enable internet access using an internet gateway · NAT gateway basics · Regional NAT gateways · Compare NAT gateways and NAT instances · Egress-only internet gateways · Amazon VPC pricing




