PrivateLink for a SaaS provider
Exposing a service from your VPC to many customer VPCs is the case AWS PrivateLink was designed for. It scales to thousands of consumers, across accounts you do not control, with no peering connections, VPNs or Direct Connect circuits to negotiate — and no requirement that anybody’s address space line up.
The two sides
Section titled “The two sides”The provider creates an endpoint service in front of a Network Load Balancer or a Gateway Load Balancer, and adds the consumer accounts to its allowed principals. The load balancer sits in front of the application.
The consumer creates an interface VPC endpoint to that service name. Endpoint network interfaces appear in the consumer’s chosen subnets with private addresses from the consumer’s own ranges.
Traffic between them stays on the AWS network. Connections are one-directional: the consumer initiates, the provider responds. The provider never gains a route into the consumer’s VPC, and vice versa.
Provider checklist
Section titled “Provider checklist”- Put the application behind a Network Load Balancer (for TCP, UDP and TLS) or a Gateway Load Balancer (for transparent inspection appliances).
- Create the endpoint service against that load balancer, choosing whether connection requests are accepted automatically or manually.
- Add the consumer accounts, roles or users as allowed principals. Until you do, nobody can create an endpoint.
- Optionally associate a private DNS name with the service, so consumers can use your public hostname unchanged. AWS requires domain ownership verification by TXT record before this is permitted.
- Enable the endpoint service in every Availability Zone your consumers use, or they will need cross-zone traffic to reach you.
Endpoint service metrics appear in the AWS/PrivateLinkServices CloudWatch namespace, including a per-endpoint breakdown through Contributor Insights — which is how you find out which customer is generating the load.
Consumer checklist
Section titled “Consumer checklist”- Obtain the service name from the provider.
- Create an interface endpoint in private subnets, one per Availability Zone.
- Attach a security group that permits only the required ports.
- Leave private DNS enabled where the provider offers it.
- Confirm the endpoint reaches
available— it stayspendingAcceptanceuntil the provider accepts.
Why this rather than peering
Section titled “Why this rather than peering”Peering joins two networks: every route table entry the other side adds becomes reachable, and the address spaces must not overlap. An endpoint service publishes exactly one service. The consumer reaches that service and nothing else in the provider’s VPC, and the two VPCs can use identical private ranges without consequence.