How Many NAT Gateways Do You Need in AWS? One or Per AZ?
When designing your AWS network, a common question arises: should you use a single NAT Gateway or one per Availability Zone (AZ)? The answer depends on your priorities—whether it's cost, availability, or resilience. While a single NAT Gateway can save money, it also creates a single point of failure that could disrupt your workloads if an AZ goes down.
If high availability is a concern, using at least two NAT Gateways is the better approach. Many AWS users deploy one per AZ to ensure that private instances maintain outbound internet access even if an entire AZ experiences an outage. However, it’s important to recognize that an AZ failure impacts more than just networking—your database replicas, EC2 instances, and load balancers may also be affected. Before committing to a NAT Gateway strategy, it’s worth checking how often AZ failures have occurred in your chosen AWS region.
Balancing Cost and Resilience
One of the main reasons teams hesitate to deploy multiple NAT Gateways is cost. AWS charges a fixed hourly rate per NAT Gateway, plus per-GB data processing fees. If you place a single NAT Gateway in one AZ and route all traffic through it, you might face unexpected inter-AZ data transfer charges. This means that while a single NAT Gateway setup may look cheaper at first, cross-AZ traffic costs can make it more expensive than expected.
A middle-ground approach is to deploy two NAT Gateways across two AZs instead of one per AZ. This setup reduces costs while still providing some redundancy. Additionally, automation can be used to reroute traffic in case one NAT Gateway fails.
An Alternative to NAT Gateway: fcknat
For teams looking to further optimize costs, fcknat is an alternative worth considering. Instead of relying on AWS-managed NAT Gateways, fcknat allows you to build a NAT solution using EC2 instances. This helps avoid AWS’s high data transfer fees while still maintaining network redundancy.
Choosing the Right Strategy
If high availability is your priority, using one NAT Gateway per AZ is the safest choice. If cost savings are more important, two NAT Gateways with automated failover can be a good compromise. For those wanting the lowest possible cost, fcknat provides an alternative that avoids AWS’s pricing model altogether.
Ultimately, an AZ failure impacts more than just NAT Gateways, so it’s essential to design your entire architecture with redundancy in mind.

NAT Gateway count matters