NAT Gateway
NAT Gateway in Amazon VPC
ℹ️ Definition and Purpose
- NAT Gateway is an AWS-managed service that lets resources in a private subnet connect to the internet
- It replaces the traditional NAT Instance approach with greater scalability and reliability
- It automatically maintains availability and adjusts bandwidth to demand
⚠️ Limits and Requirements
- Must be deployed in a public subnet
- Requires a dedicated Elastic IP address
- Does not support direct inbound connections from the internet into the private subnet
- The Elastic IP must not already be associated with any other instance or network interface
💡 Advantages over NAT Instance
- Automatic scaling based on demand
- High availability, fully managed by AWS
- Reduced administrative and maintenance overhead
- Higher and more consistent bandwidth
🔒 Security Considerations
- Only allows traffic to flow from the private subnet out to the internet
- Does not support inbound connections from the internet
- Requires proper route table and security group configuration

💡 Migration Note
When migrating from a NAT Instance to a NAT Gateway, you can reuse the existing Elastic IP address, but you must first disassociate it from the NAT Instance.