What are the biggest levers to reduce NAT gateway cost?
IntermediateProductionVPC and Network Design
Answer
- S3 and DynamoDB gateway endpoints: free, and remove the largest traffic from NAT.
- Interface endpoints for chatty AWS APIs (ECR API and DKR, STS, CloudWatch Logs, SSM, Secrets Manager) where volume justifies the hourly cost.
- Pull-through cache in ECR instead of pulling from Docker Hub through NAT.
- Keep NAT and its consumers in the same AZ.
- IPv6 egress via egress-only internet gateway, which has no processing charge.
Use VPC Flow Logs filtered on the NAT ENI to find the top destinations first.
More on VPC and Network Design
Walk through a production VPC layout for a multi-tier app.BeginnerHow do you size VPC CIDRs to avoid painting yourself into a corner?IntermediateOne NAT gateway or one per AZ?BeginnerWhich VPC endpoints do you create by default in a private EKS or ECS VPC?IntermediateHow do you lock down what can go through a VPC endpoint?AdvancedHub-and-spoke with Transit Gateway: how do you design route tables?Advanced