# NAT Gateway vs NAT instance

AWS comparisons · Updated 17 November 2026

**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

| Factor | NAT gateway | NAT instance |
|---|---|---|
| Availability | Redundant within an AZ; regional mode spans AZs automatically | Single instance; you script failover |
| Bandwidth | Scales to 100 Gbps | Limited by the instance type |
| Maintenance | None | OS patches, NAT configuration, your own AMI |
| Cost model | Per hour plus per GB processed | Instance hours plus normal data transfer |
| Security groups | Cannot be attached | Attachable |
| Port forwarding, bastion use | Not supported | Possible, with manual configuration |
| Idle timeout behaviour | Sends RST to clients | Sends 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 CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Compare NAT gateways and NAT instances](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-comparison.html)
- [Regional NAT gateways](https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateways-regional.html)
- [NAT instances](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html)

## Related

- [NAT Gateway vs VPC endpoints](https://cloudconsole.dev/vs/nat-gateway-vs-vpc-endpoint)
- [Security group vs network ACL](https://cloudconsole.dev/vs/security-group-vs-nacl)
- [Transit Gateway vs VPC peering](https://cloudconsole.dev/vs/transit-gateway-vs-vpc-peering)
- [CloudWatch alarm: NAT Gateway ErrorPortAllocation](https://cloudconsole.dev/alarms/nat-gateway-errorportallocation)
- [Why is my AWS bill so high?](https://cloudconsole.dev/how-to/why-is-my-aws-bill-so-high)
- [ALB vs API Gateway](https://cloudconsole.dev/vs/alb-vs-api-gateway)

---

Source: https://cloudconsole.dev/vs/nat-gateway-vs-nat-instance

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
