Networking

AWS VPC Public vs Private Subnet Topology

Network Design diagram · made in Skemio

AWS network topology diagram showing an Internet Gateway connecting to a Public Subnet with a NAT Gateway, which routes traffic to a Private Subnet containing Database instances.
AWS network topology diagram showing an Internet Gateway connecting to a Public Subnet with a NAT Gateway, which routes traffic to a Private Subnet containing Database instances.

What it shows

  • Public subnets attach directly to an Internet Gateway via routing table 0.0.0.0/0.
  • Private subnets forward egress traffic to a NAT Gateway in the public subnet.
  • Databases remain completely unreachable from unsolicited external connections.

The takeaway

Isolate databases in private subnets with one-way egress routing via NAT.

More network design diagrams