AWS PrivateLink

Also known as: PrivateLink

On this page 7

AWS PrivateLink is an AWS technology that provides private, unidirectional connectivity between a consumer VPC and a service, whether that service is an AWS offering, a partner product or an application in another account. In cloud networking, it replaces internet paths, NAT devices and full network peering with interface endpoints: elastic network interfaces with private IP addresses that appear inside the consumer subnet and carry traffic only to one specific service.

PrivateLink is valued because it exposes a service, not a network. The consumer can reach a single port on a single service, while the provider never gains routes back into the consumer environment, which greatly simplifies security reviews and overlapping address planning.

AWS PrivateLink works by placing provider-side load balancing behind an endpoint service and letting consumers create interface VPC endpoints that connect to it. The provider fronts its application with a Network Load Balancer or a Gateway Load Balancer and registers it as an endpoint service; each consumer then creates an endpoint in chosen subnets, one network interface per Availability Zone.

Traffic flows only from consumer to provider at connection setup, so the design is one-way by construction. The provider sees requests arriving from its load balancer, typically with source addresses translated, and can enable Proxy Protocol version 2 to learn the original client address and endpoint identifier.

ComponentOwnerRole
Endpoint serviceProviderPublishes the service under a unique service name
Network Load BalancerProviderDistributes connections to provider targets
Interface endpointConsumerCreates private network interfaces in consumer subnets
Endpoint network interfaceConsumerHolds a private IP address in each chosen zone
Private DNS nameProvider or AWSResolves the normal service hostname to private addresses
Security groupConsumerControls which sources may reach the endpoint
Building blocks of a PrivateLink connection

Because the endpoint holds addresses from the consumer subnet, CIDR overlap does not matter. Two companies that both use 10.0.0.0/16 can still connect through PrivateLink, something that VPC peering and transit gateways cannot do without renumbering.

Endpoint types and access controls

AWS offers several VPC endpoint types, and only some of them are powered by PrivateLink. Knowing the difference avoids paying for interface endpoints where a free option exists, and vice versa.

Endpoint typeUses PrivateLinkSupported targetsCost model
Interface endpointYesMost AWS services, partner and custom servicesHourly per zone plus per GB processed
Gateway Load Balancer endpointYesInline security appliancesHourly per zone plus per GB processed
Resource endpointYesIndividual resources such as a databaseHourly plus per GB processed
Gateway endpointNoAmazon S3 and DynamoDB onlyNo charge
VPC endpoint types and their characteristics

Access is controlled at three independent layers. The provider decides which AWS principals may connect through an allow list and can require manual acceptance of each connection request. The consumer attaches security groups to the endpoint interfaces. Finally, an endpoint policy, written as an IAM resource policy, can restrict which API actions and resources are reachable through the endpoint, for example only one S3 bucket.

PrivateLink is one of several ways to connect workloads across VPCs and accounts, and it is narrower but safer than network-level options. Peering and transit gateways join entire address spaces, whereas PrivateLink joins a consumer to one service.

OptionScope of accessOverlapping CIDRsDirection
AWS PrivateLinkOne service and portSupportedConsumer to provider only
VPC peeringEntire VPC address rangesNot supportedBidirectional
Transit gatewayMany VPCs and on-premises networksNot supportedBidirectional with route tables
Internet with NATPublic endpointsIrrelevantOutbound, over public paths
Comparison with neighboring connectivity options

In practice, organizations combine them: a hub-and-spoke network built on a transit gateway carries general traffic, while centralized interface endpoints in a shared services VPC give every spoke private access to AWS APIs. Similar concepts exist on other platforms under the name private endpoint, such as Azure Private Link and Google Private Service Connect.

Good PrivateLink designs start from DNS, zones and cost, because these three factors cause most surprises. With private DNS enabled, applications keep using standard hostnames such as the regional service name, and the VPC resolver returns endpoint addresses instead of public ones.

SituationRecommended choiceReason
Private subnets call many AWS APIsInterface endpoints for busy servicesRemoves NAT gateway processing for that traffic
Heavy S3 traffic from a VPCGateway endpointFree and highly scalable
SaaS vendor serves many customer VPCsEndpoint service behind an NLBNo peering, no exposure of customer networks
Dozens of VPCs need the same endpointsCentralized endpoints with shared DNSFewer endpoints and lower hourly charges
On-premises access to AWS APIsInterface endpoint reached over VPN or Direct ConnectPrivate path with inbound resolver rules
Decision guide for common situations

For resilience, endpoints should span at least two Availability Zones, and providers should enable cross-zone load balancing or keep targets in every zone the consumers use. Each endpoint interface supports high bandwidth, typically 10 Gbps per zone with bursts up to 100 Gbps, which is sufficient for most workloads.

Limitations and common mistakes

AWS PrivateLink has specific constraints that should be checked before committing to it. The most frequent problems are listed below.

  • Assuming two-way connectivity: the provider cannot initiate connections back to consumers through the same endpoint.
  • Forgetting the per-zone hourly charge: creating every possible endpoint in every VPC can cost more than the NAT gateway it replaces.
  • Leaving private DNS disabled, so applications still resolve public addresses and send traffic out through NAT.
  • Supporting only TCP: interface endpoints for custom services carry TCP traffic, and UDP needs other designs.
  • Overly broad endpoint policies that allow any bucket or account, which weakens data exfiltration controls.

The idea in brief

Imagine two office buildings that need to exchange documents. One option is to send couriers across a busy public street. Another is to merge the buildings into one, which means strangers can wander every corridor.

AWS PrivateLink is like installing one private delivery window in the wall. The tenant on one side can pass requests through that single window to one specific department. Nobody else uses the street, and nobody can walk into the other building.

A practical scenario

A payment analytics company offers its fraud scoring API to banks that run workloads on AWS. Bank security teams refuse VPC peering and internet exposure, and several banks use the same 10.0.0.0/8 address space as the vendor.

The vendor places its scoring cluster behind a Network Load Balancer in three Availability Zones and publishes an endpoint service with manual acceptance and an allow list of customer account IDs. Each bank creates an interface endpoint in its own private subnets and points its applications to a private DNS name such as api.scoring.example.

Onboarding a new bank now takes about one day instead of several weeks of network negotiations. Traffic stays on the AWS backbone, address overlap causes no conflicts, and no bank network is ever reachable from the vendor side.