CloudConsole

NAT Gateway vs NAT instance

Updated 17 November 2026 · How we write and check guides

Short answer

Use a NAT gateway for production: AWS manages availability and scaling (up to 100 Gbps), and regional NAT gateways now expand across Availability Zones automatically. A NAT instance only makes sense for low-traffic dev or test VPCs where the NAT gateway's hourly and per-GB processing charges outweigh the cost and risk of running and patching your own EC2 instance.

NAT Gateway vs NAT instance: deciding factors Availability, Bandwidth, Maintenance, Cost model; When a NAT gateway is the…
The deciding factors from this page's comparison table, and the cases where each option wins.

NAT gateway vs NAT instance

FactorNAT gatewayNAT instance
AvailabilityRedundant within an AZ; regional mode spans AZs automaticallySingle instance; you script failover
BandwidthScales to 100 GbpsLimited by the instance type
MaintenanceNoneOS patches, NAT configuration, your own AMI
Cost modelPer hour plus per GB processedInstance hours plus normal data transfer
Security groupsCannot be attachedAttachable
Port forwarding, bastion useNot supportedPossible, with manual configuration
Idle timeout behaviourSends RST to clientsSends FIN

The old AWS-provided NAT AMI is built on Amazon Linux AMI 2018.03, which has reached end of maintenance support. A NAT instance today means building your own NAT AMI on a current Amazon Linux and disabling source/destination checks.

When a NAT gateway is the answer

  • Any production workload in private subnets that calls the internet, other Regions' public endpoints or third-party APIs.
  • Teams that do not want a single EC2 instance on the critical path for all outbound traffic.
  • VPCs spread across several AZs: a regional NAT gateway removes the need for a public subnet and per-AZ route tables, and expands as workloads appear in new zones.

Cut the processing charge before you consider replacing it: add gateway endpoints for S3 and DynamoDB (free) and interface endpoints for heavy AWS API traffic, and keep resources in the same AZ as their zonal NAT gateway.

When a NAT instance can be justified

  • Sandbox or dev VPCs with occasional package downloads, where a small instance stopped out of hours costs less than an always-on gateway.
  • You need features a NAT gateway lacks: port forwarding, acting as a bastion, or a security group on the NAT itself.
  • You accept that a stopped or failed instance cuts off outbound access for the whole private subnet.

Switching from an instance to a gateway

  1. Create the NAT gateway (public, in a public subnet, or regional).
  2. To keep the same public IP, disassociate the Elastic IP from the NAT instance and associate it with the gateway at creation.
  3. Point the private route tables' 0.0.0.0/0 route at the NAT gateway. Existing connections drop, so do it in a quiet window.
  4. Watch the gateway's CloudWatch metrics (for example ErrorPortAllocation and PacketsDropCount) and then terminate the instance.

Common wrong reasons

  • "A t-series instance does the same job for less." Until it runs out of CPU credits or bandwidth, or needs patching.
  • "NAT gateways are the main cost, so remove them." Usually the per-GB processing is the cost, and VPC endpoints remove most of it.
  • "One NAT gateway is enough." A zonal NAT gateway is an AZ-level dependency; use one per AZ or regional mode.

Questions

Is a NAT instance cheaper than a NAT gateway?

For tiny, intermittent traffic it can be, because you avoid the hourly and per-GB processing charges. You take on availability, bandwidth and patching risk instead.

Does a NAT gateway need a public subnet?

A zonal public NAT gateway does. A regional NAT gateway does not: it is a standalone resource with its own route table.

Can I attach a security group to a NAT gateway?

No. Control traffic with security groups on the resources behind it and network ACLs on the subnets.

When this happens away from your desk

When outbound traffic stops, everything in the private subnets fails at once and the errors look unrelated: timeouts to APIs, failed package installs, stuck deploys. CloudConsole is being built to show NAT and service alarms together on a phone with production guardrails.

About the app → · Download on the App Store

Sources