Managed services such as object storage, secrets managers and SaaS APIs are reachable on public endpoints by default. Private endpoints (AWS PrivateLink, Azure Private Link, Google Private Service Connect) place a network interface for the service inside your subnet. DNS resolves the service name to that private address, and policies on the endpoint restrict which resources and identities may use it.
- Detect
- Analyze
- Resolve
When to use it
- Workloads with no internet egress that still need cloud APIs
- Compliance rules that forbid data on public paths
- Exposing your own service to customers without peering networks
When to avoid it
- Dozens of services in many VPCs without central DNS: endpoint sprawl gets costly
How traffic flows
- Create an interface endpoint in each zone's private subnet and enable private DNS for it.
- The service hostname now resolves to the endpoint's private address inside the VPC.
- An endpoint policy limits which actions and resources can be reached through it.
- Resource policies on the service (for example a bucket policy) deny any request that did not arrive through your endpoint.
Configuration examples
resource "aws_vpc_endpoint" "secrets" {
vpc_id = module.vpc.vpc_id
service_name = "com.amazonaws.us-west-2.secretsmanager"
vpc_endpoint_type = "Interface"
subnet_ids = module.vpc.private_subnets
security_group_ids = [aws_security_group.endpoints.id]
private_dns_enabled = true
}
resource "aws_vpc_endpoint" "s3" {
vpc_id = module.vpc.vpc_id
service_name = "com.amazonaws.us-west-2.s3"
vpc_endpoint_type = "Gateway"
route_table_ids = module.vpc.private_route_table_ids
}{
"Version": "2012-10-17",
"Statement": [{
"Sid": "OnlyThroughOurEndpoint",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::prod-reports", "arn:aws:s3:::prod-reports/*"],
"Condition": { "StringNotEquals": { "aws:SourceVpce": "vpce-0abc123def456" } }
}]
}Examples are starting points. Review provider limits, names and versions for your environment before applying.
What to monitor
| Signal | Why it matters |
|---|---|
| Endpoint network interface health per zone | An endpoint in one zone only creates a hidden single point of failure. |
| Requests denied by endpoint or resource policy | Shows misconfiguration and attempted access from outside. |
| DNS answers for service names | A public answer inside the VPC means private DNS is not in effect. |
Common failure modes
Private DNS disabled
Traffic quietly goes to the public endpoint through NAT, adding cost and exposure.
Pulse sees service traffic on the NAT gateway and flags the endpoint configuration.
Endpoint security group blocks 443
Every call to the service times out.
Lens correlates SDK timeouts with the security group change that caused them.