Overview
Both let private-subnet resources reach the internet without being directly reachable from it, but they differ in who operates the underlying infrastructure. A NAT Gateway is a fully managed AWS resource, while a NAT Instance is a plain EC2 instance you configure and maintain yourself. The choice mainly comes down to operational overhead, throughput, and cost at your traffic volume.
Comparison Diagram
Comparison Table
| Aspect | NAT Gateway | NAT Instance |
|---|---|---|
| Provisioning | Create as a managed AWS resource via console/CLI in minutes; no AMI to pick | Launch a regular EC2 instance from a NAT-capable AMI and configure it manually |
| Network placement | Deployed in a public subnet; referenced as the target in private subnet route tables | EC2 instance in a public subnet with source/destination check disabled |
| Throughput & scaling | Automatically scales up to 100 Gbps of bandwidth | Capped by the chosen instance type’s network performance; resize to scale |
| High availability | HA automatically within its AZ; deploy one per AZ for cross-AZ resilience | Single point of failure unless you script failover (Auto Scaling, health checks, Lambda) |
| Security controls | No security groups attached; cannot double as a bastion or proxy | Has security groups and can run additional software, e.g. as a bastion or custom proxy |
| Patching & maintenance | Fully managed by AWS; no OS or software to patch | You patch the OS, monitor health, and manage the AMI lifecycle |
| Cost model | Hourly charge plus per-GB data processing fee | Standard EC2 instance-hour cost only, no extra NAT data fee |
| Teardown | Delete the NAT Gateway resource and release its Elastic IP | Terminate the EC2 instance and release its Elastic IP |
Key Differences
- NAT Gateway is a fully managed AWS service with no OS to maintain, unlike a self-managed NAT Instance
- Gateway auto-scales bandwidth up to 100 Gbps; an Instance’s throughput is capped by its instance type
- Gateway has no security groups; an Instance supports them and can double as a bastion
- Gateway HA is automatic within an AZ; an Instance needs manual failover scripting
- Gateway bills per-GB processed; an Instance only incurs standard EC2 pricing
When to Use Each
NAT Gateway
- Production, high-throughput traffic: NAT Gateway auto-scales to 100 Gbps without capacity planning or instance resizing.
- Minimizing operational overhead: There’s no OS to patch, monitor, or replace, which suits teams that want to avoid NAT-layer maintenance.
- Multi-AZ fault isolation: Deploying one NAT Gateway per AZ keeps outbound traffic resilient to a single AZ failure with built-in HA.
NAT Instance
- Low-traffic dev/test environments: A small EC2 instance is cheaper than NAT Gateway’s per-GB processing fee when data volume is minimal.
- Custom NAT or proxy logic: Running your own instance lets you add traffic filtering, logging, or proxy behavior NAT Gateway doesn’t expose.
- Security-group-level control: Teams needing fine-grained security group rules on the NAT path itself must use an instance, since NAT Gateway has none.