- Newest
- Most votes
- Most comments
This is a classic split-horizon DNS scenario where you need different DNS resolution behavior for the same domain depending on the context. Here's how to solve this issue:
You can implement split-view DNS (also known as split-horizon DNS) in Amazon Route 53 to handle both public and private resolution for the same domain. For your specific case:
-
Create both public and private hosted zones with the same name (cloud.example.com).
-
In the private hosted zone (which is already associated with your VPC):
- Keep the record for abc.cloud.example.com pointing to your PrivateLink endpoint
- In the public hosted zone:
- Create a record for xyz.cloud.example.com pointing to the public Databricks workspace A
- For the specific record that needs public resolution (xyz.cloud.example.com), you need to create a specific forwarding rule using Route 53 Resolver:
- Set up an outbound Route 53 Resolver endpoint in your VPC
- Create a forwarding rule for xyz.cloud.example.com that directs queries to public DNS resolvers
- This will override the private hosted zone for this specific record
This configuration will allow your EC2 instances to resolve abc.cloud.example.com to the private PrivateLink endpoint while still resolving xyz.cloud.example.com to the public IP address.
Alternatively, you could use Route 53 Resolver rules to implement conditional forwarding, where queries for specific records within your domain are forwarded to different DNS resolvers based on your requirements.
With this setup, your EC2 instances will be able to connect to both Databricks workspaces - workspace B through the PrivateLink connection and workspace A over the public internet.
Sources
Considerations when working with a private hosted zone - Amazon Route 53
Streamline hybrid DNS management using Amazon Route 53 Resolver endpoints delegation | Networking & Content Delivery
Route 53 Resolver and on-premises DNS servers | AWS re:Post
AWS PrivateLink concepts - Amazon Virtual Private Cloud
answered 10 months ago
Relevant content
asked a year ago
