Skip to content

VPC endpoint type service network access from peering and on-prem

0

Dear Team - I have below scenario.

  • Resource Gateway created in Provider-Account-A VPC-A
  • Resource configuration created in Provider-Account-A and shared with Consumer Account-B
  • In Consumer Account B, i have created VPC endpoint type Service network and attach to local service network
  • From EC2 of consumer account B, i can successfully resolve snra-06e9.rcfg-07280d.42ccc.vpc-lattice-rsc.us-east-1.on.aws resource config DNS name.
  • In Account-A, created R53 profile and attach PHZ. In this PHZ, i created CNAME entry for resource config DNS name. Also shared R53 profile to Account-B and Account-C and attached local VPCs.
Question-1

I have peered Account-B to Account-C and added necessary routes in both the route tables. However, from Account-C, i am unable curl snra-06e9.rcfg-07280d.42ccc.vpc-lattice-rsc.us-east-1.on.aws. i can dig with PHZ but curl not working from Account-C. Is this supported situation? if yes, what is missing ?

Question-2

How i can resolve the same DNS of vpc endpoint type service network from on-prem over direct connect? For this, do i need to create VPC endpoint type resource ?

Thanks

asked a year ago460 views

2 Answers
0
Accepted Answer

Client traffic that comes from outside the VPC over a VPC peering connection, Transit Gateway, Direct Connect, or VPN can use the VPC service network endpoint to reach services and resource configurations. When you create a service-network VPC endpoint, AWS creates Regional DNS names (endpointId-snraId.rcfgId.randomHash.vpc-lattice-rsc.region.on.aws) for each resource and service that you can use to communicate with the resource and service from your VPC and from on-premises. These DNS records are public, therefore these DNS names are publicly resolvable. However, DNS requests from outside the VPC still return the private IP addresses of the service network endpoint's network interfaces. You can use these DNS names to access the resource and services from on-premises, as long as you have access to the VPC that the service network endpoint is in, through VPN or Direct Connect.

AWS

answered a year ago

0

Thank you for your questions regarding VPC endpoint type service network access from peering and on-premises environments. I'll address each of your questions separately.

Question 1: VPC peering does not automatically extend DNS resolution capabilities across peered VPCs. While you have successfully set up peering between Account-B and Account-C and added the necessary routes, DNS resolution for the service network endpoint doesn't automatically work across the peering connection. To enable DNS resolution from Account-C, you would need to set up additional DNS infrastructure.

One approach to resolve this issue is to use Amazon Route 53 Private Hosted Zones. You can create a private hosted zone in Account-B for the service network endpoint DNS, and then associate this hosted zone with the VPC in Account-C. This would allow EC2 instances in Account-C to resolve the service network endpoint DNS name.

Question 2: To resolve the VPC endpoint type service network DNS from on-premises over Direct Connect, you can use the following approach:

  1. Set up a Route 53 Resolver inbound endpoint in the VPC that has the Direct Connect connection.
  2. Configure your on-premises DNS server to forward DNS queries for the service network endpoint domain to the Route 53 Resolver inbound endpoint.
  3. Create a private hosted zone in the VPC with the Direct Connect connection, containing the DNS records for the service network endpoint.

You don't necessarily need to create a VPC endpoint type resource for this scenario. The existing service network endpoint in Account-B can be accessed from on-premises, provided you have the correct networking and DNS setup in place.

Remember that while the DNS names for service network endpoints are publicly resolvable, the actual network access is still private. Ensure that your network routing is correctly configured to allow traffic from on-premises to reach the VPC containing the service network endpoint.

These solutions will allow you to resolve and access the service network endpoint DNS from both the peered VPC in Account-C and from your on-premises environment over Direct Connect.
Sources
Access service networks through AWS PrivateLink - Amazon Virtual Private Cloud
Streamline DNS management for AWS PrivateLink deployment with Amazon Route 53 Profiles | Networking & Content Delivery
Centralized access to VPC private endpoints - Building a Scalable and Secure Multi-VPC AWS Network Infrastructure

answered a year ago

  • i already did below but still not working. it resolve the DNS name with dig command but curl still not working. SG and NACLs are open.

    One approach to resolve this issue is to use Amazon Route 53 Private Hosted Zones. You can create a private hosted zone in Account-B for the service network endpoint DNS, and then associate this hosted zone with the VPC in Account-C. This would allow EC2 instances in Account-C to resolve the service network endpoint DNS name

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.