How does an AWS NAT gateway work, and what are its limits?
AdvancedConceptNAT, Firewalls & VPN
Answer
It sits in a public subnet with an Elastic IP; private subnets route 0.0.0.0/0 to it. It performs PAT and supports up to 55,000 simultaneous connections to a single destination IP:port, scaling bandwidth to 100 Gbps automatically.
It is zonal, so use one per AZ to avoid cross-AZ charges and failure coupling. Errors like ErrorPortAllocation in CloudWatch mean you exhausted ports to one destination.
More on NAT, Firewalls & VPN
What is NAT and why is it used?BeginnerWhat is the difference between SNAT, DNAT and PAT?AdvancedWhy is NAT gateway cost a common surprise and how do you reduce it?IntermediateWhat is conntrack and what happens when its table fills up?AdvancedWhat is the difference between a stateful and a stateless firewall?BeginnerWhat is a security group and how does it differ from a network ACL?Beginner