Comparison lab
Internet gateway vs NAT gateway
An internet gateway is the front door; a public NAT gateway lets private instances call out.
Picture the difference
Public instance ↔ internet gateway ↔ internet; private IPv4 instance → public NAT gateway → internet gateway → internet
| Option | What it does | Exam clue | When not to use it |
|---|---|---|---|
| Internet gateway | Attach a VPC to the public internet through a route target for applicable subnets. | internet gateway, public subnet, public IPv4, route table | Attaching an internet gateway alone does not publish private resources or override security groups and network ACLs. |
| Public NAT gateway | Let private workloads initiate internet-bound IPv4 traffic without accepting unsolicited inbound connections through the gateway. | NAT, private subnet, outbound IPv4, Elastic IP, internet gateway | A 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
- Give a public subnet a direct route to and from the internet Internet gateway
- 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.