AWS VPC Networking Explained for SAA-C03: Subnets, Routing, NAT and Endpoints
Know this topic? Test it on a full SAA-C03 paper
A complete SAA-C03 practice exam: 65 questions in 130 minutes, an explanation on every item and an Exam Coach report that ranks your weakest domains.
AWS-SAA-FULL
Try a free AWS SAA exam
Already have an account? Log in to redeem
A VPC is your private network in an AWS Region. A subnet is public only because its route table has a route to an internet gateway. Instances in private subnets reach out through a NAT gateway, and they reach S3 or DynamoDB through a gateway VPC endpoint, which has no additional charge. Security groups are stateful and work at instance level; network ACLs are stateless and work at subnet level.Checked against AWS's published exam guide on 9 November 2026.
In this guide
The building blocks
| Component | What it does | Exam point |
|---|---|---|
| Subnet | A range of IPs in one Availability Zone | A subnet lives in exactly one AZ |
| Route table | Decides where traffic goes | A route to an internet gateway makes the subnet public |
| Internet gateway | Connects the VPC to the internet | Attached to the VPC |
| NAT gateway | Outbound-only internet access for private subnets | Lives in a public subnet, in one AZ |
| VPC endpoint | Private access to AWS services | Gateway type for S3 and DynamoDB; interface type for others |
| Security group | Instance-level firewall | Stateful, allow rules only |
| Network ACL | Subnet-level firewall | Stateless, allow and deny |
Security groups vs network ACLs
| Security group | Network ACL | |
|---|---|---|
| Applies to | Instance (ENI) | Subnet |
| State | Stateful: return traffic is allowed | Stateless: return traffic needs its own rule |
| Rules | Allow only | Allow and deny |
| Evaluation | All rules together | In number order, first match wins |
To block one specific IP address, use a network ACL deny rule. A security group cannot deny.
Reaching AWS services privately
| Gateway endpoint | Interface endpoint (PrivateLink) | |
|---|---|---|
| Services | S3 and DynamoDB | Many AWS services and partner services |
| How | Route table entry | An ENI with a private IP in your subnet |
| Cost | No additional charge | Hourly and per-GB charges |
A common cost question: private instances send heavy S3 traffic through a NAT gateway. A gateway endpoint removes that NAT processing charge.
Connecting networks
| Option | Use it when | Remember |
|---|---|---|
| VPC peering | A few VPCs need to talk | Not transitive; no overlapping CIDRs |
| Transit Gateway | Many VPCs and on-premises networks | Hub and spoke |
| Site-to-Site VPN | Quick, encrypted link over the internet | Fast to set up, variable latency |
| Direct Connect | Consistent, private bandwidth | Takes longer to provision; not encrypted by default |
NAT gateway placement
A NAT gateway sits in one Availability Zone. For resilience, deploy one per AZ and route each private subnet to the NAT gateway in its own AZ. A single shared NAT gateway is cheaper but creates a single-AZ dependency and cross-AZ data charges. AWS's guide tests this trade-off directly under Task 4.4.
A worked scenario: the three-tier VPC
Requirement: a web application must be reachable from the internet, its application servers must download patches and read from S3, and its database must never be reachable from the internet.
- Put the Application Load Balancer in public subnets in two Availability Zones. Only the load balancer needs an internet-facing address.
- Put the application servers in private subnets with a default route to a NAT gateway in the same AZ. They can reach out for patches, and nothing can reach in directly.
- Add a gateway VPC endpoint for S3 so S3 traffic skips the NAT gateway and its data processing charge.
- Put the database in a private subnet with no route to the internet at all.
- Chain the security groups. The application security group allows traffic from the load balancer's security group, and the database security group allows port 3306 only from the application security group.
Referencing a security group instead of an IP range keeps the rule correct as instances scale in and out. Exam answers that open a database to 0.0.0.0/0 or to a whole VPC range are there to be eliminated.
NAT gateway vs NAT instance
| NAT gateway | NAT instance | |
|---|---|---|
| Managed by | AWS | You |
| Scaling | Automatic | Limited by the instance size |
| Availability | Redundant within one AZ | You build any failover yourself |
| Setup detail | None | Must disable the source/destination check |
Choose the NAT gateway unless a question specifically requires the lowest possible cost at very small scale. For IPv6, an egress-only internet gateway does the same job as NAT: outbound only.
How the exam words it
| If the question says | Think |
|---|---|
| Private instances need outbound internet | NAT gateway |
| Reach S3 without traversing the internet or NAT | Gateway endpoint |
| Expose a service privately to other VPCs | AWS PrivateLink |
| Block a specific IP address | Network ACL deny rule |
| Connect dozens of VPCs | Transit Gateway |
| Encrypted link, needed quickly | Site-to-Site VPN |
| Consistent bandwidth to a data center | Direct Connect |
| Direct Connect plus encryption | A VPN over Direct Connect |
VPC Networking: practice questions
Five original questions. Each explanation says why the other options fail.
Your free AWS SAA exam code is ready
Sit the full SAA-C03 paper against the real 130-minute clock. AWS SAA is $39 once, lifetime, future versions included.
AWS-SAA-FULL
Redeem the code
Already have an account? Log in to redeem
Frequently asked questions
What is the difference between a public and a private subnet in AWS?
A public subnet's route table has a route to an internet gateway. A private subnet does not, so it reaches the internet only through a NAT device.
What is the difference between a security group and a network ACL?
Security groups work at the instance level, are stateful and only allow traffic. Network ACLs work at the subnet level, are stateless, support allow and deny, and are evaluated in order.
Do gateway VPC endpoints cost money?
No. AWS states there is no additional charge for using gateway endpoints, which serve S3 and DynamoDB.
When should I use Transit Gateway instead of VPC peering?
When many VPCs and on-premises networks need to connect. Peering is one-to-one and not transitive.