Skip to content

RDS PostgreSQL instance DNS endpoint not resolving (everything else configured properly)

0

SOLVED My subnets were configured properly, or so I thought. Even though the RDS instance was on subnets with access to internet gateways, two other subnets in that same group were private. Connecting those with the gateway as well solved the problem.

I have an RDS PostgreSQL instance in us-west-1 that I cannot connect to because the DNS endpoint does not resolve. Here’s what I’ve done and confirmed so far:

  • Publicly accessible: Yes
  • Security group inbound/outbound rules allow traffic from my IP
  • VPC has an attached internet gateway
  • Route table for the subnet includes 0.0.0.0/0 → IGW
  • DNS resolution and DNS hostnames: Enabled on the VPC
  • Subnets used by RDS have public IPv4 auto-assignment and no blocking of public access
  • Verified the VPC, subnet, and RDS instance are all in the same region
  • Able to connect to other public PostgreSQL servers from my local machine (so no local firewall issue)
  • nslookup and ping for the RDS endpoint return: Non-existent domain (tried with 8.8.8.8 and default DNS)
  • e-created the RDS instance multiple times, same issue every time

I suspect there’s some underlying AWS issue with the DNS endpoint registration for this RDS instance. Is there any setting or step I’m missing, or does this require AWS support to refresh the endpoint’s DNS record? Any help or insight would be greatly appreciated.

Thanks!

1 Answer
0

Based on your description, it sounds like you've covered most of the common configuration issues that would prevent connectivity to an RDS PostgreSQL instance. The fact that the DNS endpoint isn't resolving at all (returning "Non-existent domain") is particularly unusual since AWS should automatically register DNS records for RDS instances.

Here are some additional troubleshooting steps to consider:

  1. Subnet Configuration: Ensure your RDS instance is deployed only in public subnets. If your RDS instance is using both private and public subnets, this can cause connectivity issues, especially during failover. Having the instance in both subnet types can lead to DNS resolution problems.

  2. Check the Endpoint Format: Verify that you're using the correct endpoint format. RDS endpoints typically follow this pattern: <instance-identifier>.<random-string>.<region>.rds.amazonaws.com. Make sure there are no typos in the endpoint name.

  3. DNS Resolution Path: The DNS resolution issue might be related to how your local network is handling AWS domain queries. Try using different DNS servers or a VPN to rule out any local DNS interference.

  4. Recent Changes: If this RDS instance was working previously, consider any recent changes to your AWS environment that might have affected DNS resolution.

  5. Test from an EC2 Instance: Launch an EC2 instance in the same VPC and try to resolve the RDS endpoint from there. This can help determine if the issue is specific to your local environment or if it's an AWS-side problem.

  6. Check for Service Health Issues: Check the AWS Service Health Dashboard for any reported issues with RDS or Route 53 in your region.

If none of these steps resolve the issue, it may indeed require AWS Support intervention. They can check if there's an issue with the DNS registration for your specific RDS instance and help resolve any underlying problems that might not be visible through the console.
Sources
Lost public access to AWS RDS postgresql instance | AWS re:Post
How DNS name of VPC endpoint resolves to Private IP outside VPC | AWS re:Post
Why can't I access my RDS? | AWS re:Post
Troubleshoot connection to AWS service endpoints from Linux | AWS re:Post

answered a year ago

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.