The main differences between NAT instances and NAT gateways in AWS relate to availability, scalability, management, and cost:

AttributeNAT GatewayNAT Instance
AvailabilityHighly available, redundant within each AZ. AWS manages HA.No built-in HA; you must manage failover via scripts or manually.
BandwidthScales automatically up to 100 Gbps.Limited by EC2 instance type and size; requires manual scaling.
ManagementFully managed by AWS; no maintenance required.User-managed: You must maintain OS, patches, software updates.
PerformanceOptimized software specifically for NAT traffic.Generic EC2 AMI configured as NAT; less optimized.
CostCharged based on hours of usage and data processed; generally higher.Cheaper instance costs but increased operational overhead.
Type/SizeFixed offering; no need to choose instance size.Must pick instance type and size according to traffic needs.
Public IPElastic IP assigned at creation; cannot be changed later.Elastic IP or public IP can be associated or reassigned.
Security GroupsCannot associate security groups directly. Use subnet-level ACLs and security groups on backend resources.Can assign security groups to control inbound/outbound traffic on the instance.
Port ForwardingNot supported.Supported via manual configuration.
Use as BastionNot supported.Can be used as a bastion host.
Traffic MetricsSupports CloudWatch metrics.CloudWatch metrics available for the EC2 instance.
Timeout BehaviorReturns TCP RST on connection timeout.Sends TCP FIN to gracefully close connections.
IP FragmentationSupports UDP fragmentation; TCP and ICMP fragments are dropped.Supports reassembly for UDP, TCP, and ICMP fragments.

Key recommendations:

  • AWS recommends NAT gateways for most workloads due to their better availability, automatic scaling, ease of maintenance, and optimized performance156.

  • NAT instances provide more control and flexibility (e.g., port forwarding, bastion hosts) but require ongoing manual management and may be harder to scale or maintain13.

  • NAT gateways automatically handle failover and redundancy within an Availability Zone, but best practice is to deploy one in each AZ for zone-independent architecture1.

  • NAT instances require you to manage failover, often through scripting or custom setups, and handle all maintenance tasks like patching and monitoring12.

  • NAT gateways cost more per data processed but reduce admin overhead and support up to 100 Gbps; NAT instances’ bandwidth depends on the EC2 instance and can bottleneck under heavy loads14.

In general, NAT gateways suit production, high-availability, and scalable environments, while NAT instances might be chosen for cost-sensitive, legacy, or highly customized scenarios.

If migrating from a NAT instance to a NAT gateway, AWS provides a simple process to replace the NAT route and reassign Elastic IPs, with caution about connection drops during the switch1.

Thus, the NAT gateway is the superior, fully managed, scalable solution whereas the NAT instance is a manual, customizable but less resilient option. The choice depends on your needs for control versus ease of use.