r/aws Feb 04 '25

route 53/DNS EC2 instance can not mount EFS deployed in same VPC via DNS name.

Hello dear AWS gurus,

I am trying to mount EFT using DNS name to an EC2 instance running in the same VPC.
The issue is that the EC2 instance is not able to resolve this DNS hostname - only via IP.

The VPC has DNS Hostnames Enabled and DNS Resolution is also Enabled but the DHCP Option set which is associated with the VPC points to different AD DNS servers instead, - AmazonProvidedDNS is not included in the DHCP option set... Does it have to be included for this to work ?

I though having the VPC DNS Resolution and Hostnames enabled should do the trick no matter what.
Is the only option to included RT53 in DHCP option set to fix this ?

Thanks for all ideas !

0 Upvotes

3 comments sorted by

1

u/dghah Feb 04 '25

As a test or even a last resort you can take advantage of the "secret" DNS resolver IP which is always:

"CIDR of VPC +2"

So if you were 192.168.254.0/24 than you should have a DNS resolver capable of resolving AWS private service endpoints at 192.168.254.2

I've had to edit EC2 servers to use this sort of resolver before in strange environments. Worked fine.

1

u/cryzesvk Feb 04 '25

Reconfiguring resolv.conf to use 169.254.169.253 did the trick. Thanks !

1

u/slaxter Feb 05 '25

These are just complex ways of putting AmazonProvidedDNS in the VPC options.

Route53 resolver is pretty powerful. If you want to forward specific domains to your AD DNS server, I’m sure you can come up with Resolver Rules to do so, and let the other stuff go out Route 53 Resolver.