Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Route53 - delegate subdomain

I created two public hosted zones in AWS Route53:

  • domain.com
  • sub.domain.com

In "sub.domain.com" zone I added "A" record for "test.sub.domain.com" name resolved to 10.0.1.5. I can resolve "test.sub.domain.com" name using "sub.domain.com" name servers.

> nslookup test.sub.domain.com <sub.domain.com server>

Name:    test.sub.domain.com
Address:  10.0.1.5

Following instruction for Creating a Subdomain That Uses Amazon Route 53 as the DNS Service, in "domain.com" zone I added "NS" record for "sub.domain.com" pointed to the "sub.domain.com" zone name servers. Now, when I try to resolve "test.sub.domain.com" name using "domain.com" zone name servers, I get response that name is served by "sub.domain.com" servers, but it cannot resolve to IP address. Below is example of "nslookup" response:

> nslookup test.sub.domain.com <domain.com server>
Name:    test.sub.domain.com
Served by:
- <sub.domain.com server>

          sub.domain.com

Does Route53 support subdomain delegation to other Route53 servers? Have I missed something in the configuration?

like image 682
Yaroslav Avatar asked Aug 06 '15 16:08

Yaroslav


2 Answers

It seems to me that you're asking how to use Route53 NS records from within other Route53 domains?

Well, as it turns out it's very much verbatim - you go to your sub.domain.com, copy its 4 NS records (that Route53 had generated automatically when it was created), and paste them as NS records for the name "sub" within the domain.com.

(And then wait for the TTLs to expire, etc)

I think there was already one such question and answer somewhere on the StackExchange network, but I couldn't find it now.

like image 85
Josip Rodin Avatar answered Sep 29 '22 11:09

Josip Rodin


What you are describing is how DNS works. Recursive name servers would follow the name server referral and ask the name servers for sub.domain.com to resolve test.sub.domain.com.

You can try this out by doing a dig +trace test.sub.domain.com, assuming your are delegating domain.com to the route 53 you configured in the .com zone.

like image 21
imperalix Avatar answered Sep 29 '22 12:09

imperalix