7
votes

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?

3

3 Answers

1
votes

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.

4
votes

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.

0
votes

In addition to Josip Rodin's answer I had to add A record to my subdomain hosted zone as an alias to my Elastic Beanstalk environment. After this and TTL expired all started working.