AWS VPC Traffic Journey — animated

One HTTPS request, followed through a real production VPC: an Internet Gateway, a public subnet holding the load balancer and NAT Gateway, a private app subnet, and a private database subnet — every route-table decision and firewall check included. Then watch a direct attack try the same trip and get nowhere. This is the VPC mental model the AWS SAA-C03 exam tests again and again.

Amazon VPC · 10.0.0.0/16 Public subnet · 10.0.1.0/24 route table: 0.0.0.0/0 → Internet Gateway Private app subnet · 10.0.2.0/24 route table: 0.0.0.0/0 → NAT Gateway Private DB subnet · 10.0.3.0/24 no internet route at all 🧑 User203.0.113.50 🌐 IGWInternet Gateway ⚖️ ALB10.0.1.25 · HTTPS 443 🔁 NAT GatewayElastic IP 3.80.15.9 🖥️ App server · EC210.0.2.40 · no public IP 🗄️ Database · RDS10.0.3.60 · MySQL 3306 HTTPS request
🌐 Inbound — following one HTTPS request into the VPC.

🔍 Packet inspector — this step

Source—
Destination—
Route decision—
Allowed by—

The four ideas behind the journey

Public vs private is a route, not a name

A subnet is public only if its route table sends 0.0.0.0/0 to an Internet Gateway. Give a subnet any name you like — the route table decides what it can reach, and what can reach it. The local route for the VPC CIDR (10.0.0.0/16) exists in every route table and can never be removed or overridden.

The NAT Gateway is a one-way door

It lives in a public subnet and owns an Elastic IP. Private resources use it to start outbound connections — software updates, API calls — while internet-initiated connections still cannot get in: no translation entry is waiting for them, and the private resource has no public address to aim at.

Stateful security groups, stateless NACLs

Security groups remember connections: allow traffic in, and its replies flow back with no extra rule. Network ACLs remember nothing — every packet in both directions must match a rule, and return traffic rides ephemeral ports (1024–65535). Most "the security group is right but it still fails" exam scenarios are a missing NACL ephemeral rule.

No public IP, no inbound path

The app server and the database carry only private addresses inside 10.0.0.0/16. An attacker on the internet cannot even address a packet to them — there is no route and no public identity to aim at. Reachability here is designed in from the start, not patched on afterwards.

Keep the journey going

Where this appears on your exam

Questions students ask

What makes a subnet public or private in an AWS VPC?
Only its route table. A subnet is public when its route table sends internet-bound traffic (0.0.0.0/0) to an Internet Gateway; it is private when it doesn't — a private subnet typically routes 0.0.0.0/0 to a NAT Gateway instead. The name you give the subnet changes nothing, and neither does its security group. This is one of the most-tested VPC facts on the SAA-C03.

Why can't the internet connect to the app server, yet the app server can download updates?
Inbound and outbound are different doors. The app server has no public IP address and its subnet has no route to the Internet Gateway, so there is simply no path for an internet-initiated connection to arrive. Outbound works because its route table sends internet traffic to a NAT Gateway in the public subnet, which translates the private source to its Elastic IP — and only replies to connections the server started are translated back.

What is the difference between a security group and a network ACL?
A security group is attached to a resource (an ENI) and is stateful: allow a connection in, and its return traffic is allowed out automatically, with no extra rule. A network ACL is attached to a whole subnet and is stateless: return traffic needs its own explicit rule, usually allowing the ephemeral port range 1024–65535 in both directions. Exam scenarios love the case where the security group is correct but the page still fails — the missing NACL ephemeral rule is the culprit.

Can the local route in a VPC route table be changed or overridden?
No. Every route table automatically contains a local route for the VPC's CIDR block (here 10.0.0.0/16 → local), and it cannot be deleted or overridden by a more specific route. That is why traffic between subnets inside the VPC always flows directly, and why VPC design starts with choosing a CIDR big enough for every subnet you will ever need.