AWSCloud Visual Academy

Comparison lab

Internet gateway vs NAT gateway

An internet gateway is the front door; a public NAT gateway lets private instances call out.

All comparisons

Picture the difference

Public instance ↔ internet gateway ↔ internet; private IPv4 instance → public NAT gateway → internet gateway → internet

OptionWhat it doesExam clueWhen not to use it
Internet gatewayAttach a VPC to the public internet through a route target for applicable subnets.internet gateway, public subnet, public IPv4, route tableAttaching an internet gateway alone does not publish private resources or override security groups and network ACLs.
Public NAT gatewayLet private workloads initiate internet-bound IPv4 traffic without accepting unsolicited inbound connections through the gateway.NAT, private subnet, outbound IPv4, Elastic IP, internet gatewayA NAT gateway does not publish a private web server. Account for gateway and traffic charges; endpoints may avoid internet egress for supported AWS services.

Decision tree

  1. Give a public subnet a direct route to and from the internet Internet gateway
  2. Allow private IPv4 resources to initiate internet connections without public IPs of their own Public NAT gateway

If none of these clues fit, check the exact requirement before choosing.