Private connectivity
PrivateLink is half the answer. DNS is the other half.
What really happens at the network and DNS level when you "enable PrivateLink".
Kevin Keller · kevinkeller.org
Why it matters
Public endpoints widen the attack surface
- Traffic crosses the public internet
- The service has a public IP anyone can reach
- Your VPC needs an internet gateway or NAT
- DORA, NIS2 or PCI-DSS may prohibit public paths for sensitive data
What PrivateLink does
A private, one-way connection between VPCs
- The provider creates an endpoint service behind a Network Load Balancer
- You create an interface endpoint in your VPC
- AWS adds a network interface with a private IP from your subnet
- Traffic flows over the AWS backbone to the provider
- The provider cannot connect back into your VPC
The catch
Without private DNS, nothing changes
Even with PrivateLink configured, your app still resolves the public IP and bypasses the endpoint entirely.
Your application connects to a hostname, not to 10.0.1.47.
The fix
A private hosted zone always wins over public DNS
AWS maps the service hostname to your endpoint's private IP. Same hostname, same port, same certificate, no code changes.
Resolution order
How the VPC resolver decides
- Private hosted zones linked to the VPC: return the private IP
- Route 53 Resolver rules: forward to on-premises or custom DNS
- No match: forward to public DNS
On-premises apps need a Resolver inbound endpoint to get the private answer.
Across clouds
The same idea under three names
| AWS | Azure | GCP | |
|---|---|---|---|
| Private endpoint | Interface Endpoint | Private Endpoint | PSC Endpoint |
| DNS | Private Hosted Zone | Private DNS Zone | Cloud DNS |
| Cross-region | No, use peering | Yes | Yes |
Security considerations
A private path still needs controls
- Endpoint policies: limit who can use it and for which resources
- Security groups: only app subnets, only required ports
- DNS leakage: watch flow logs and DNS query logs
- Exfiltration: combine endpoint, bucket and SCP policies
Cost
~$15/month
for a typical two-AZ deployment, plus data processing
Interface endpoints cost about $0.01 per hour per AZ and $0.01 per GB in us-east-1. Often negligible next to the compliance value.
When to use it
Match the tool to the case
| Use case | PrivateLink? |
|---|---|
| SaaS from a regulated VPC | Yes |
| Compliance bans public paths | Yes |
| Public API for customers | No |
| S3 from a VPC | Gateway endpoint, free |
| Cost-sensitive dev and test | Maybe not |
Takeaway
PrivateLink gives you a private IP. Private DNS makes your apps use it.
Kevin Keller · kevinkeller.org