How It Works | Centralized Architecture | Implementation | DNS and Routing | Security and Cost | Tradeoffs and Selection
π Bottom Line: Which Endpoints Should Be Shared?
For enterprise environments, the most complete design for sharing AWS service endpoints across VPCs is Central Endpoint VPC + Interface VPC Endpoints + Transit Gateway + Route 53 Profiles. For a small number of VPCs, VPC peering can replace Transit Gateway.
- π― Interface endpoints: Good candidates for centralization. Endpoints for SSM, KMS, ECR, STS, Secrets Manager, CloudWatch, SNS, SQS, and similar services can live in a dedicated Endpoint VPC and be reached privately from other VPCs.
- πͺ£ Gateway endpoints: S3 and DynamoDB gateway endpoints cannot be extended across VPCs. Create them separately in every application VPC; gateway endpoints carry no additional endpoint charge.
- π Network connectivity: Peering is often enough for two or three VPCs. Transit Gateway becomes easier to operate as the number of VPCs grows.
- π§ DNS: For new deployments, use Route 53 Profiles to extend the centralized interface endpoints' private DNS to application VPCs.
- π Regional boundaries: Production environments should generally use one Endpoint Hub per AWS Region to avoid cross-Region latency, transfer charges, and coupled failures.
π§© What βSharing an Endpointβ Really Means
The endpoint resource itself is not directly shared with another VPC. An interface endpoint remains in the Shared Endpoint VPC and creates private-IP ENIs in the selected subnets. Other VPCs route traffic to those ENIs through Transit Gateway or VPC peering.
- Assume VPC-A, VPC-B, and VPC-C use
10.1.0.0/16,10.2.0.0/16, and10.3.0.0/16, while the Endpoint VPC uses10.100.0.0/16. - If 20 VPCs each deploy 15 interface endpoints across two Availability Zones, the environment grows to 20 Γ 15 Γ 2 = 600 endpoint ENIs.
- With centralization, the same services are deployed only in two AZs in the Endpoint VPC, sharply reducing fixed resources, policies, and maintenance objects.
- Interface endpoints are billed by endpoint-hour in each AZ plus data processing, so duplicating them becomes increasingly expensive as the VPC count rises.
ποΈ Recommended Centralized Architecture
πΊοΈ Core Topology
AWS SERVICES
β²
β
PrivateLink
β
ββββββββββββββββββββββββββββ
β NETWORK ACCOUNT β
β Central Endpoint VPC β
β β
β AZ-A AZ-C β
β VPCE ENI VPCE ENIβ
β β
β SSM / KMS / STS / ECR β
β Secrets / CloudWatch β
β SNS / SQS / EC2 API β
β Route 53 Profile β
ββββββββββββββ¬ββββββββββββββ
β
Transit Gateway
ββββββββββββΌββββββββββββ
β β β
PROD DEV TEST
β β β
VPC-A VPC-B VPC-C
β β β
S3 Gateway S3 Gateway S3 Gateway
DDB Gateway DDB Gateway DDB Gateway
π§° Four Core Services
- AWS PrivateLink / interface VPC endpoints: Provide private connectivity from application VPCs to Regional AWS services.
- AWS Transit Gateway: Connects the Endpoint VPC to multiple application VPCs, while TGW route tables control reachability.
- Route 53 Profiles: Centrally manage interface endpoint private DNS and associate that DNS configuration with multiple VPCs.
- AWS RAM: Shares Transit Gateway and Route 53 Profiles across AWS accounts.
π’ When an On-Premises Data Center Is Involved
When the on-premises network reaches AWS through VPN or Direct Connect, add a Route 53 Resolver inbound endpoint so on-premises DNS can forward AWS service names to Route 53 Resolver. Do not send queries directly to a VPC's βCIDR + 2β resolver address.
βοΈ Phase One: Build the Endpoint VPC and Connectivity
1οΈβ£ Create a Dedicated Endpoint VPC
- Create
Endpoint-VPCin a Network or Shared Services account. This example uses10.100.0.0/16. - Use at least two AZs in production, such as
10.100.10.0/24in AZ-a and10.100.20.0/24in AZ-c, with one Endpoint Subnet in each. - An interface endpoint creates an ENI in every selected Endpoint Subnet. A two-AZ deployment reduces exposure to an AZ-level outage.
- Avoid placing shared endpoints in an arbitrary application VPC, where network ownership, access boundaries, and incident response become tied to one workload.
2οΈβ£ Add Transit Gateway or VPC Peering
- Create a central Transit Gateway and VPC attachments for the Endpoint VPC, VPC-A, VPC-B, and VPC-C.
- In a multi-account environment, share the TGW through AWS RAM, then let application accounts create or accept attachments.
- For only two or three application VPCs, peer each one directly with the Endpoint VPC to avoid another network layer and TGW charges.
- Peering is not transitive. As the environment grows, connection and route-table sprawl make the TGW hub-and-spoke model more practical.
π£οΈ Phase Two: Configure Bidirectional Routing
3οΈβ£ Application VPC Route Tables
Every application subnet that needs an endpoint must route the Endpoint VPC CIDR to the TGW. For VPC-A:
Destination Target
10.1.0.0/16 local
10.100.0.0/16 tgw-xxxx
VPC-B and VPC-C also send 10.100.0.0/16 to the TGW. With peering, use the appropriate peering connection as the target.
4οΈβ£ Return Routes in the Endpoint VPC
The route table associated with the Endpoint Subnets must return traffic to every application VPC:
10.100.0.0/16 local
10.1.0.0/16 tgw-xxxx
10.2.0.0/16 tgw-xxxx
10.3.0.0/16 tgw-xxxx
Both directions are required. A forward route without a return route commonly produces a TCP SYN with no SYN/ACK and eventually a connection timeout.
5οΈβ£ TGW Route Tables
- Routes associated with application VPCs must send
10.100.0.0/16to the Endpoint VPC attachment. - On the Endpoint VPC side, routes for
10.1.0.0/16,10.2.0.0/16, and10.3.0.0/16must point to their respective VPC attachments. - Use route propagation or static routes. Environments with strict segmentation often use multiple TGW route tables to control propagation explicitly.
π Phase Three: Create the Interface Endpoints
6οΈβ£ Create Service Endpoints in the Endpoint VPC
- Open VPC β Endpoints β Create endpoint and choose the Regional service, such as
com.amazonaws.ap-northeast-1.ssmfor Systems Manager in Tokyo. - Select
Endpoint-VPCand the two subnetsendpoint-subnet-aandendpoint-subnet-c. - With the Route 53 Profiles design, keep Private DNS enabled. AWS SDKs and the CLI can continue using standard service names while resolving them to private PrivateLink addresses.
- Create only the endpoints required by actual workloads. Every interface endpoint adds AZ-hour and data-processing charges.
π¦ Common Centralized Endpoints
- Systems Manager: SSM, SSM Messages, and EC2 Messages.
- Core services: EC2 API, KMS, Secrets Manager, STS, Lambda, and EventBridge.
- Monitoring and messaging: CloudWatch, CloudWatch Logs, SNS, and SQS.
- Containers and delivery: ECR API, ECR DKR, ECS, and CodeArtifact.
- Application access: supported PrivateLink services such as API Gateway
execute-api.
π Phase Four: Security Groups and Endpoint Policies
7οΈβ£ Endpoint Security Group
- Create a dedicated security group for the endpoint ENIs, such as
sg-vpce-central. - Allow inbound HTTPS over TCP 443 only from application CIDRs that need access, such as
10.1.0.0/16,10.2.0.0/16, and10.3.0.0/16. - Do not allow
0.0.0.0/0in production. Narrow the source by organization, environment, sensitivity, or dedicated endpoint where appropriate. - Security groups are stateful, but instance egress rules, NACLs, and intermediate appliances must still permit TCP 443 and return traffic.
8οΈβ£ Endpoint Policy
- The endpoint policy controls which principals can perform which service actions through that entry point. A full-access policy is useful for connectivity testing, not as a long-term production default.
- A KMS endpoint can be limited to approved accounts, IAM roles, and KMS keys. Apply supported condition keys and resource constraints to other services as well.
- Effective authorization is the combination of endpoint policies, IAM policies, SCPs, resource policies, and policies such as bucket or key policies.
- Least-privilege policies become more complex as more VPCs share an endpoint, and policy document size limits still apply. Split endpoints by environment or trust boundary when necessary.
π Phase Five: Centralize DNS with Route 53 Profiles
Working IP connectivity does not guarantee that an application will use the endpoint. Applications normally call standard names such as ssm.ap-northeast-1.amazonaws.com. Application VPCs must resolve that name to endpoint ENI addresses, not public AWS service addresses.
- Open Route 53 β Profiles β Create Profile and create a profile such as
central-vpce-profile. - A Route 53 Profile can centrally associate private hosted zones, Resolver rules, DNS Firewall, interface VPC endpoints, and Resolver query logging.
- On the profile's VPC endpoints page, associate the centralized SSM, KMS, STS, ECR, Secrets Manager, and other endpoints. The console selects up to 10 existing endpoints at a time; use additional operations or the API for more.
- Associate VPC-A, VPC-B, and VPC-C with the profile. A VPC can be associated with only one profile at a time, so plan existing DNS resources first.
- Afterward, standard service-name lookups in application VPCs return centralized VPCE addresses such as
10.100.10.25and10.100.20.41.
π’ DNS Sharing in a Multi-Account Landing Zone
π§ Account Responsibilities
AWS Organizations
Network Account
β Endpoint VPC
β Transit Gateway
β Route 53 Profile
Production Account
β VPC-A
β VPC-B
Development Account
β VPC-C
β VPC-D
Security Account
β VPC-E
- The Network Account shares the Route 53 Profile through AWS RAM with Production, Development, Security, and other accounts in the same Region.
- Each account associates its VPCs with the shared profile, reusing centralized endpoint DNS without creating a private hosted zone for every service and VPC.
- This division fits AWS Organizations, Control Tower, and Landing Zone operating models: the network team owns VPCEs, DNS, TGW, and logging, while application teams own compute and workload resources.
π End-to-End Request Flow
β DNS Resolution
When an EC2 instance at 10.1.10.50 in VPC-A calls Secrets Manager, the SDK looks up secretsmanager.ap-northeast-1.amazonaws.com. Route 53 Resolver and the associated profile return the private addresses of the centralized VPCE.
EC2 β Route 53 Resolver β Route 53 Profile
β VPCE Private DNS β 10.100.10.25 / 10.100.20.25
β‘ Network Path
10.1.10.50
β HTTPS 443
βΌ
VPC-A Route Table
βΌ
Transit Gateway
βΌ
Endpoint VPC
βΌ
VPCE ENI 10.100.10.25
βΌ
AWS PrivateLink
βΌ
Secrets Manager
This path to the AWS service stays private and does not require a NAT Gateway or Internet Gateway. The request must still pass both network controls and identity authorization.
πͺ£ Why Gateway Endpoints Cannot Be Centralized
Interface endpoints and gateway endpoints are different resources. Gateway endpoints primarily support S3 and DynamoDB, do not use AWS PrivateLink, and cannot extend beyond their VPC.
- Resources on the other side of VPN, VPC peering, Transit Gateway, or Direct Connect cannot use an S3 or DynamoDB gateway endpoint in the Endpoint VPC.
- Create S3 and DynamoDB gateway endpoints separately in VPC-A, VPC-B, and VPC-C, and associate local route tables with them.
- Gateway endpoints carry no additional endpoint charge, so centralizing them would offer no fixed-cost advantage.
- The common enterprise pattern is therefore centralized interface endpoints with distributed gateway endpoints.
π¦ ECR: A Commonly Missed Dependency
- When ECS, EKS, or EC2 pulls an image from ECR,
ecr.apialone is usually not enough;ecr.dkris also required. - Container image layers are backed by S3, so pulls may still fail even when both ECR interface endpoints exist.
- A typical design centralizes ECR API and ECR DKR interface endpoints while creating an S3 gateway endpoint in every application VPC.
- When troubleshooting image pulls, check DNS, both ECR endpoints, the S3 gateway endpoint, routing, security groups, and the task or instance IAM permissions.
π°οΈ Legacy Design: Private Hosted Zones
A Traditional Design That Still Works
- Disable Private DNS on the centralized interface endpoint.
- Manually create a Route 53 private hosted zone matching the AWS service name, such as
ssm.ap-northeast-1.amazonaws.com. - Create an A alias record pointing to the VPCE, then associate the PHZ with the Endpoint VPC and every application VPC.
Why It Is No Longer the First Choice for New Environments
- With 30 endpoints and 100 VPCs, manual PHZ associations turn into a very large management matrix.
- Route 53 Profiles can associate all centralized VPCEs once and then apply the configuration to many VPCs, reducing repeated hosted zones, records, and associations.
- The legacy approach remains useful for existing systems or specialized DNS requirements; evaluate Route 53 Profiles first for greenfield deployments.
π Handling Multiple Regions
- Technically, Inter-Region TGW peering or cross-Region VPC peering can let a Singapore VPC reach an Endpoint VPC in Tokyo.
- That path adds cross-Region data transfer charges and latency, while most AWS service endpoints are themselves Regional.
- A more resilient production design creates a separate Endpoint Hub and Route 53 Profile in every Region, such as one in Tokyo and one in Singapore.
- Regional isolation also narrows the blast radius and clarifies DNS, routing, service dependencies, and compliance boundaries.
π΅ Cost Model: Centralized Does Not Always Mean Cheaper
Centralized Cost Components
- Transit Gateway attachment hourly charges.
- Transit Gateway data-processing charges.
- Interface endpoint hourly charges for each deployed AZ.
- PrivateLink data processing, plus possible cross-AZ or cross-Region data transfer charges.
When Centralization Is More Likely to Save Money
The strongest business case appears when there are many VPCs, many required endpoints, and relatively low traffic per VPC. With 50 VPCs, 20 services, and two AZs, a distributed design can create 2,000 endpoint ENIs, versus roughly 40 in a centralized design. TGW costs must still be included.
High-Traffic Workloads Need Their Own Calculation
If one VPC moves several TB of S3 data every day, sending it through TGW to an S3 interface endpoint is often a poor value. A local S3 gateway endpoint is usually the better design. AWS prices vary by Region and over time, so build the budget from current Regional pricing and compare everything in U.S. dollars.
β Main Advantages of Centralized Endpoints
- π Fewer resources: Large VPC estates no longer duplicate the same endpoint ENIs.
- π§° Centralized operations: Endpoint policies, security groups, tags, private DNS, and logs can be managed in the Network Account.
- π Consistent security baseline: A central team owns VPCEs, DNS, TGW, and access controls, while application teams focus on EC2, ECS, EKS, Lambda, and RDS.
- π Less NAT dependency: Calls to PrivateLink-enabled AWS services no longer need a NAT Gateway and public service API path.
- π’ Strong multi-account fit: The design aligns well with AWS Organizations, Control Tower, RAM, and Landing Zone responsibilities.
β οΈ Main Drawbacks of Centralized Endpoints
- π₯ Larger blast radius: A failure in a central SSM endpoint, DNS configuration, or policy may affect many VPCs at once.
- π More complex policies: One endpoint serving many accounts, roles, and resources requires a growing least-privilege policy that is still subject to document size limits.
- π§ Longer DNS chain: A local endpoint needs only its VPCE and private DNS; a centralized design also involves profiles, TGW, the central VPCE, and cross-account associations.
- πΈ Added TGW cost: For high-volume Application VPC β TGW β VPCE traffic, data-processing charges can become substantial.
- π Reduced isolation: Workloads share endpoint capacity, security groups, and policies, requiring stronger monitoring, change control, and segmentation.
π Centralized vs. Per-VPC Endpoints
| Category | Central Endpoint | Endpoint in Every VPC |
|---|---|---|
| Endpoint count and fixed cost | Fewer endpoints; fixed costs scale better as VPC count grows | Count grows linearly with VPCs and services |
| Network cost | Usually includes TGW attachment and processing charges | Local VPCE traffic does not need TGW |
| DNS and operations | More DNS components, but centralized governance | Simple per VPC, but operational objects are scattered |
| Isolation and blast radius | Shared controls and capacity; less isolation and a larger blast radius | Stronger isolation; failures typically affect one VPC |
| Endpoint policy | Centralized but complex across many accounts and workloads | Clearer boundaries and usually simpler policies |
| Best fit | Large, multi-account Landing Zones | Small environments or isolated, high-volume workloads |
π§ Choosing by VPC Count
1β3 VPCs
- Start with endpoints in each VPC for the simplest architecture and strongest isolation.
- If reducing endpoint count matters, use peering, a Route 53 Profile, and a small Central Endpoint VPC.
- Introducing Transit Gateway solely to share a few endpoints is usually unnecessary.
5β20 VPCs
- Seriously evaluate Endpoint VPC + TGW + Route 53 Profiles.
- Compare duplicated endpoint fixed charges, TGW charges, and real traffic volume in the cost model.
- Keep dedicated endpoints for high-volume or strongly isolated workloads, creating a hybrid design.
20 to Hundreds of VPCs
- A Network Account typically centralizes TGW or Cloud WAN, Endpoint VPCs, Route 53 Profiles, Resolver, Network Firewall, and DNS Firewall.
- Manage endpoints and account associations with infrastructure as code, standard tags, logs, monitoring, and formal change controls.
- Split resources by Region, environment, and trust boundary so every workload does not depend on a single central stack.
π Recommended Deployment Pattern
- π Interface endpoints: Centralize them in a dedicated Endpoint VPC.
- πͺ£ S3 and DynamoDB gateway endpoints: Create them separately in every application VPC.
- π£οΈ Network: Use peering for a few VPCs and Transit Gateway for medium-to-large environments.
- π DNS: Use Route 53 Profiles for new environments; retain legacy PHZ designs only where needed.
- π’ Multiple accounts: Manage centrally in the Network Account and share TGW and profiles through AWS RAM.
- π Multiple Regions: Build one Endpoint Hub per Region instead of centralizing across Regions.
- π Security: Combine endpoint security groups, endpoint policies, IAM, SCPs, and resource policies.
- π΅ Cost: Compare total cost of ownership in U.S. dollars using the actual service count, VPC count, AZ count, and traffic volume.
π οΈ Troubleshooting Order When Access Fails
- DNS: Run
dig ssm.ap-northeast-1.amazonaws.com. It should return a private VPCE address such as10.100.x.x, not a public IP. - Spoke VPC route table: Confirm that the Endpoint VPC CIDR points to TGW or peering.
- TGW route table: Check routes from the application VPC to the Endpoint VPC and back.
- Endpoint VPC route table: Make sure Endpoint Subnets can return traffic to every application VPC.
- VPCE security group: Verify that TCP 443 is allowed from application CIDRs.
- NACL: Check inbound, outbound, and ephemeral port ranges.
- Endpoint policy: Confirm that the principal, action, and resource are not denied.
- IAM / resource policy / SCP: Finally inspect identity permissions, resource policies, and organization-level controls.
Working in the order of resolution, routing, network controls, and authorization is much faster than jumping randomly between console pages.