Aws private hosted zone dns not getting resolved from different vpcs in same account

341 views Asked by At

I created a private hosted zone abc.com and associate it with 2 VPCs, vpc-1 and vpc-2. There is a resource in private subnet in vpc-1 running a http service and for this there is a record added in private hosted zone, svc.abc.com. Now svc.abc.com is successfully getting accessed (200 http response code is returned) from other resources in vpc-1, but resources in vpc-2 are not able to resolve svc.abc.com. Both VPCs are associated with aws default DHCP option set as well.

Considering all the resources private hosted zone and VPCs are in same aws account I am expecting vpc-2 to be able to successfully resolve svc.abc.com. Can anyone suggest what is missing here ?

1

There are 1 answers

0
Tsal Troser On BEST ANSWER

You need to enable VPC peering between the two VPCs. It's not enough that the private hosted zone are associated with the VPCs. You will be able to resolve the DNS but that record will have the private IP from each VPC and you have no route between them unless you enable VPC peering and routing.