nodemethod
ConnectivityIntermediate

Private endpoints for managed services

Reach storage, databases and partner APIs on private IPs, so traffic never touches the internet.

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.

WORKLOAD VPC (NO INTERNET ROUTE)PROVIDER NETWORKlookupprovider backboneAPPApp serversprivate subnetRTPrivate DNSsecrets.* → 10.0.40.12GWEndpoint: secrets10.0.40.12GWGateway endpointobject storageKEYSecrets managermanaged serviceDBObject storagebucket policy
traffictunnel / replicationblocked

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

  1. Create an interface endpoint in each zone's private subnet and enable private DNS for it.
  2. The service hostname now resolves to the endpoint's private address inside the VPC.
  3. An endpoint policy limits which actions and resources can be reached through it.
  4. 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
}

Examples are starting points. Review provider limits, names and versions for your environment before applying.

What to monitor

SignalWhy it matters
Endpoint network interface health per zoneAn endpoint in one zone only creates a hidden single point of failure.
Requests denied by endpoint or resource policyShows misconfiguration and attempted access from outside.
DNS answers for service namesA 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.

Checklist

0 of 5 done
Was this pattern useful?

Run this pattern with NodeMethod watching it.

NodeMethod is onboarding early-access teams now. Tell us about your environment and we will be in touch.

esc
↑↓ to move↵ to open