Menu

Stop Paying AWS to Talk to Itself: When to Use VPC Endpoints Instead of a NAT Gateway
📰

Stop Paying AWS to Talk to Itself: When to Use VPC Endpoints Instead of a NAT Gateway

DEV Community: cloud·DrSkyle·10 days ago
#h5nmHNUd
#devtocloud#devto#dev#gateway#traffic
Reading 0:00
15s threshold

If you’re running EC2 instances or Lambda functions in private subnets, they may still need to reach services such as Amazon S3, Amazon ECR, and Amazon CloudWatch. A common setup sends that traffic through a NAT Gateway. It works, but it can add charges you didn’t expect.

A NAT Gateway has an hourly charge and a per-GB data processing charge. When traffic to supported AWS services passes through it, those processing charges can add up even though you’re accessing AWS services.

Where VPC endpoints help

A VPC endpoint lets resources in your VPC reach a supported service without routing that traffic through a NAT Gateway. There are two useful types:

Gateway endpoints support Amazon S3 and DynamoDB. There’s no additional hourly or data processing charge for the endpoint itself. If your workloads access S3 through a NAT Gateway, an S3 gateway endpoint is a good first place to look.

Interface endpoints support services including Amazon ECR and CloudWatch.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.