Hi there,
I'm currently facing an issue with DNS resolution while using AWS Cloud Map in combination with systemd-resolved as my DNS resolver. Here's the situation:
- I have a service registered with AWS Cloud Map in the local namespace.
- The VPC and Route 53 configurations seem to be correctly set up, with DNS hostnames and DNS resolution options enabled for the VPC, and the Route 53 private hosted zone associated with the VPC.
- However, my instance's /etc/resolv.conf file is using the default DNS resolver provided by systemd-resolved (
127.0.0.53
), and this setup is unable to resolve the hostname for the service discovery URL.
As a workaround, I updated the /etc/resolv.conf file to use the default VPC DNS resolver (169.254.169.253
) as the nameserver, which allowed me to successfully resolve the hostname for my service discovery URL. However, I'm puzzled as to why the default systemd-resolved nameserver was not able to resolve the hostname in the first place.
Here are some relevant details:
nameserver 127.0.0.53
options edns0 trust-ad
search ec2.internal
In my previous project, I didn't encounter this issue and didn't have to modify the nameserver IP. Now, to access my backend hosted on ECS using sds.local
, I had to change the nameserver, which I believe is not the ideal way.
I would greatly appreciate any insights or guidance you could provide to help resolve this DNS resolution problem effectively. Thank you so much for your assistance!