AWS · Networking and Content Delivery

AWS PrivateLink

Private connectivity to AWS services and to services in other VPCs or accounts through interface endpoints, without exposing traffic to the internet.

On the SAA-C03 exam listPrivate connectivityMulti-account

What it is and what problem it solves

AWS PrivateLink lets a VPC reach a service through interface endpoints: network interfaces with private IP addresses in your subnets. Traffic to the service stays on the AWS network and never needs an internet gateway, NAT gateway or public IP.

It works for most AWS services (for example SQS, KMS, Secrets Manager), for SaaS products, and for your own services: put a Network Load Balancer in front of an application and publish it as an endpoint service that other accounts connect to. Only that one service is exposed, not the whole network, and overlapping IP ranges do not matter.

Gateway endpoints are a separate, older kind of VPC endpoint for S3 and DynamoDB only; they are route-table entries rather than network interfaces, and have no charge.

VPCPrivate subnetLambda / EC2Interface endpointENI with a private IPRoute tablepl-xxxx (S3) →gateway endpointSQS, KMS, Secrets…most AWS servicesS3 / DynamoDBPrivateLinkfree, via routesNAT gatewaythe costly detourwithout endpoints
VPC endpoints keep traffic to AWS services private: interface endpoints (PrivateLink) and gateway endpoints (S3, DynamoDB)

When to use it

  • Private subnets must reach AWS service APIs without a NAT gateway or internet path.
  • You offer a service to other VPCs or customer accounts without peering networks.
  • Networks have overlapping CIDR ranges, which rules out peering and Transit Gateway routing.
  • Compliance requires traffic to stay off the internet.

When to avoid it

  • Full network-to-network connectivity (many services, both directions): use peering or Transit Gateway.
  • S3 or DynamoDB from inside the same Region, where a gateway endpoint is free (interface endpoints for S3 are useful from on premises).
  • Many endpoints in many VPCs for rarely used services, where hourly charges add up; centralise endpoints in a shared VPC.

Scaling model and bottlenecks

Interface endpoints scale automatically. A provider's endpoint service scales with its Network Load Balancer and targets. Centralising endpoints in a shared-services VPC reached through Transit Gateway reduces the number you run.

Performance, latency and throughput

Traffic takes a private path inside the Region with low latency. Private DNS lets applications keep using the service's normal host name, resolved to the endpoint's private IPs.

Cost model

What you pay for

  • Interface endpoints: per endpoint per Availability Zone per hour, plus per GB of data processed.
  • Gateway endpoints (S3, DynamoDB): no charge.
  • Cross-Region endpoints add inter-Region data transfer.

Where it is cost-efficient

Replacing NAT gateway traffic to AWS services, where the endpoint's hourly and per-GB charges can come to less than NAT gateway processing, depending on volume. Compare both for your traffic.

Where costs grow

Many interface endpoints in every zone of every VPC, most of them idle.

Cost controls and common surprises

Use gateway endpoints for S3 and DynamoDB, share interface endpoints from a central VPC, and only enable zones you use.

Prices differ by Region and change over time; see the pricing page linked under Sources.

Security

Controls the service provides

  • Traffic stays on the AWS network; the consumer sees only a network interface, never the provider's network.
  • Endpoint policies limit which actions and resources can be reached through an endpoint.
  • Security groups on interface endpoints control who can connect; providers accept or reject connection requests and can allow-list principals.

What you configure

Attach endpoint policies (for example, only your organisation's S3 buckets), restrict endpoint security groups, and use resource policies with aws:SourceVpce conditions to require access through the endpoint.

Logging and monitoring

VPC Flow Logs on endpoint interfaces, CloudTrail for API calls through the endpoint.

Related security services

VPC, IAM resource policies, Network Load Balancer, Route 53 private DNS.

Shared responsibility

AWS runs the endpoint plumbing. You decide who may connect, the policies, and which services you expose.

Availability, backup and failure behavior

Create interface endpoints in subnets in several Availability Zones; each zone's interface serves traffic independently.

Common service combinations

Interface endpoints for SQS, KMS, Secrets Manager, ECR, CloudWatch; NLB-backed endpoint services for SaaS; Transit Gateway for central endpoints; gateway endpoints for S3 and DynamoDB.

Business application examples

  • Lambda functions in private subnets calling Secrets Manager and SQS without a NAT gateway.
  • A SaaS vendor exposing its API privately to hundreds of customer VPCs with overlapping IP ranges.

Exam cues and common confusions

  • Private access to an AWS service from a VPC with no internet: a VPC endpoint (gateway for S3/DynamoDB, interface for others).
  • Expose one service to other accounts, overlapping CIDRs: PrivateLink endpoint service behind an NLB.
  • Require that S3 is accessed only through the endpoint: bucket policy with aws:SourceVpce.

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake