# NAT Gateway vs VPC endpoints

AWS comparisons · Updated 17 November 2026

**Short answer:** They solve different problems and you usually want both: a NAT gateway for general outbound internet access, and VPC endpoints for traffic to AWS services. Always add gateway endpoints for S3 and DynamoDB, because they cost nothing and take that traffic off the NAT gateway. Add interface endpoints (PrivateLink) for other AWS services when the traffic volume, a no-internet policy or on-premises access justifies their hourly per-AZ charge.

## NAT gateway vs gateway and interface endpoints

| Option | Reaches | Charges |
|---|---|---|
| NAT gateway | Anything on the internet, including all AWS public endpoints | Per hour plus per GB processed, plus normal data transfer |
| Gateway endpoint | Amazon S3 and DynamoDB in the same Region, from inside the VPC | None |
| Interface endpoint | Most AWS services and PrivateLink services, also from on premises and peered VPCs | Per hour per AZ plus per GB processed |

| Factor | Gateway endpoint | Interface endpoint |
|---|---|---|
| How traffic finds it | Prefix-list route in subnet route tables | ENIs with private IPs; private DNS overrides the service name |
| Access from on premises or other Regions | No | Yes, over VPN, Direct Connect, peering or Transit Gateway |
| Security controls | Endpoint policy | Endpoint policy and security groups |

## When the NAT gateway is still needed

- Workloads call third-party APIs, package repositories or anything not on AWS.
- You use AWS services in another Region through their public endpoints.
- You have dozens of AWS services in play and low volume to each, so a set of interface endpoints in every AZ would cost more than the processing they save.

## When endpoints win

- Large S3 or DynamoDB traffic from private subnets: a gateway endpoint removes the NAT processing charge for it, and needs only a route table association.
- Heavy traffic to ECR, CloudWatch Logs, Secrets Manager, STS or similar: an interface endpoint's per-GB rate is lower than NAT processing, so high volumes pay for the hourly charge.
- Private subnets that must have no internet path at all, for compliance.
- On-premises systems that must reach S3 or AWS APIs privately (interface endpoints only).

For ECS or EKS in private subnets without NAT, image pulls from ECR need the `ecr.api` and `ecr.dkr` interface endpoints plus the S3 gateway endpoint, because image layers are served from S3.

## Rolling endpoints out safely

1. Find the traffic: in Cost Explorer, group NAT gateway usage by usage type (`NatGateway-Bytes`), then use VPC Flow Logs to see which destinations dominate.
2. Add the S3 and DynamoDB gateway endpoints first; associate them with every private route table.
3. Add interface endpoints one service at a time with private DNS enabled, in the AZs your workloads use.
4. Check endpoint policies and bucket policies: an `aws:SourceVpce` condition can lock buckets to your endpoint, and also lock you out if written wrongly.

## Common wrong reasons

- **"Endpoints replace the NAT gateway."** Only for the AWS services you add. Anything else still needs NAT.
- **"Add an interface endpoint for every service."** Each costs per hour per AZ even when idle. Add them where volume or policy justifies it.
- **"S3 traffic through NAT is free because it stays in AWS."** It stays on the AWS network but the NAT gateway still charges for processing it.

## Questions

### Are VPC gateway endpoints free?

Yes. There is no charge for gateway endpoints, which exist for Amazon S3 and DynamoDB.

### What is the difference between a gateway endpoint and an interface endpoint?

A gateway endpoint is a route-table target for S3 or DynamoDB, free and usable only from inside the VPC. An interface endpoint is a set of ENIs with private IPs, supports many services, works from on premises and peered networks, and is billed per hour and per GB.

### Do I still need a NAT gateway with VPC endpoints?

Only if resources must reach the internet or AWS services you have not created endpoints for.

## When this happens away from your desk

A misconfigured endpoint policy fails closed: suddenly S3 or ECR returns AccessDenied from private subnets right after a network change. CloudConsole is being built to show the alarm, the logs and the recent change 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

- [Gateway endpoints](https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html)
- [AWS PrivateLink for Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html)
- [Pricing for NAT gateways](https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-pricing.html)

## Related

- [NAT Gateway vs NAT instance](https://cloudconsole.dev/vs/nat-gateway-vs-nat-instance)
- [Transit Gateway vs VPC peering](https://cloudconsole.dev/vs/transit-gateway-vs-vpc-peering)
- [EFS vs EBS vs S3](https://cloudconsole.dev/vs/efs-vs-ebs-vs-s3)
- [Why is my AWS bill so high?](https://cloudconsole.dev/how-to/why-is-my-aws-bill-so-high)
- [CannotPullContainerError: pull image manifest has been retried](https://cloudconsole.dev/errors/ecs-cannotpullcontainererror)
- [VPC Flow Logs rejected traffic in Logs Insights](https://cloudconsole.dev/logs-insights/vpc-flow-logs-rejected-traffic)

---

Source: https://cloudconsole.dev/vs/nat-gateway-vs-vpc-endpoint

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