- Newest
- Most votes
- Most comments
The issue you're experiencing is likely due to how DNS resolution works within RDS instances. RDS instances typically use the Amazon-provided DNS server, which may not be configured to resolve custom private DNS names by default.
To resolve this issue, you have a few potential options:
-
Use IP addresses instead of hostnames for your foreign server connections. While this is not your preferred solution, it is the most straightforward way to ensure connectivity.
-
Set up a custom DNS server within your VPC that can handle the resolution for your private domains (like mynetwork.internal). You would then need to configure your RDS instance to use this custom DNS server. However, this may require additional setup and maintenance.
-
Use AWS Route 53 Resolver. This service allows you to create inbound and outbound endpoints for DNS resolution. You can set up forwarding rules for your custom domain (mynetwork.internal) to resolve through Route 53 Resolver.
-
If possible, consider using RDS Proxy. RDS Proxy's DNS name always resolves to private IPs within the VPC, which could simplify your setup.
-
Ensure that both the
enableDnsHostnamesandenableDnsSupportattributes are set to true for your VPC. This is required for private hosted zones to work correctly. -
Double-check that your Route 53 private hosted zone is correctly associated with the VPC where your RDS instance resides.
If none of these solutions work, you may need to contact AWS support for further assistance, as there could be specific configurations or limitations with your RDS setup that are preventing proper DNS resolution of your private hostnames.
Sources
Understanding Amazon DNS - Amazon Virtual Private Cloud
Route53 Private | AWS re:Post
How to get PostgreSQL to use internal DNS resolution | AWS re:Post
2 Things come to mind..
- Is your PHZ Associated to your VPC?
- This is a hunch, but .INTERNAL is specifically set aside for private use within an organization's network and cannot be accessed publicly on the internet; this designation was officially made by ICANN (Internet Corporation for Assigned Names and Numbers) to prevent conflicts with publicly registered domains.
Im wondering if that DOMAIN is reserved internally with AWS already and this is why you may see issues?
Have you tried a different PHZ?
Thanks Gary. The PHZ is associated with the VPC. DNS resolution on the addresses works elsewhere in the VPC. What confuses me is that it's only the RDS that has issues resolving them.
Relevant content
- AWS OFFICIALUpdated 10 months ago

enableDnsHostnamesandenableDnsSupportattributes are set to true for your VPC.