AWS Route53 – How to Resolve Private DNS Name Inside EC2 Instances

amazon ec2amazon-route53amazon-vpcamazon-web-services

In AWS, I have created a VPC lets call it "myVPC".

I have 2 instances inside a public subnet in myVPC with auto-set private IP addresses below:

  • 10.0.0.10
  • 10.0.0.11

ICMP is open by setting correct Security Groups to the instances.

I created a Private Hosted Zone with name "myCompany.local" for myVPC, in Route53 with A records below:

  • A.myCompany.local -> 10.0.0.10
  • B.myCompany.local -> 10.0.0.11

DNS resolution and DNS hostnames are Enabled on this Private Hosted Zone.

I SSH to 10.0.0.10 and try to ping the other server. Ping with IP address (10.0.0.11) is successful, but ping with the DNS name (B.myCompany.local) fails with the message below:

ping: B.dashbrace.local: Temporary failure in name resolution

My purpose is to be able to use DNS names to connect to other servers inside myVPC network. Can you please mention what is the issue here? Do I need to do anything more? I see that each instance comes with a private DNS. Do I need to change the private DNS for them, and If I should how?

Best Answer

It seems that .local is treated differently. Creating new private hosted zones with myCompany.com and myCompany.internal works perfectly.

Related Topic