Design a multi-AZ NAT strategy and justify cost versus resilience.
AdvancedScenarioVPC and Networking
Answer
Situation read → One NAT gateway per AZ avoids cross-AZ charges and an AZ-failure blast radius.
What I'd do →
- Deploy a NAT gateway in each public subnet
- Per-AZ private route tables point to the NAT in the same AZ
- For dev, use one NAT to save about $32 per month per gateway
- Alarm on
ErrorPortAllocationandPacketsDropCount - Use IPv6 or endpoints to reduce the load
Why → An AZ outage with a single NAT takes all private-subnet egress with it.
Interview tip → Prod: one per AZ. Non-prod: one shared.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner