2

I have a domain for instance example.com.

The domain is hosted by a third party service (Digital Ocean).

I would like to give control of a subdomain to AWS.

So I would like to point aws.example.com to AWS.

Once the root subdomain is pointed to AWS. I would like to use Route 53 to setup the following functionality:

  • aws.example.com => alias to eb my-production-eb
  • dev.aws.example.com => alias to eb my-dev-eb
  • stage.aws.example.com => alias to eb my-stage-eb

Is this possible? Do I have to point my domains directly via cname record to the AWS load balancer?

Update 1:

I feel like I need to set the following in Digital Ocean:

  • aws.example.com => revoke control to AWS Route 53 somehow
  • *.aws.example.com => revoke control to AWS Route 53 somehow

Update 2:

The AWS documentation for Creating a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain does not work for Digital Ocean.

Do not add a start of authority (SOA) record to the zone file for the parent domain. Because the subdomain will use Amazon Route 53, the DNS service for the parent domain is not the authority for the subdomain. If your DNS service automatically added an SOA record for the subdomain, delete the record for the subdomain. However, do not delete the SOA record for the parent domain.

The question on Digital ocean regarding changing the SOA address titled "How can I change the SOA address in DNS settings?" states the following in one of the comments.

Unfortunately it is not possible to edit the SOA address right now

There is the ability to vote for this feature in Digital Ocean Configurable SOA record in DNS.

So my idea is that because you can't remove the SOA on Digital Ocean Amazon can't communicate to the domain correctly.

Rodrigo Murillo
  • 13,080
  • 2
  • 29
  • 50
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
  • This should be possible, although keeping your domain at the current host and just creating CNAMES that point to the ELBs would be a lot easier. – Mark B Apr 22 '16 at 16:44
  • I would like to have access to all the settings in Route 53, rather then Digital Ocean. – ThomasReggi Apr 22 '16 at 16:45
  • 1
    You do not need to modify the SOA records of the parent domain at all. You are adding NS records for the subdomain. This is a DNS standard configuration and should be supported. Are they telling you you cannot add NS records to your domain? That would be unusual. – Rodrigo Murillo Apr 22 '16 at 18:50
  • Hm guess not. https://www.digitalocean.com/community/questions/delegating-a-subdomain-nsd-setup. – Rodrigo Murillo Apr 22 '16 at 18:56
  • @RodrigoM I'm still stumped on this. Is this not possible? Do I have to point to the AWS load balancer from Digital Ocean directly via `cname`? – ThomasReggi Apr 22 '16 at 20:10
  • 1
    Since DO doesn't support subdomain delegation you either need to use CNAMES in DO to point to your ELBs, or move your whole domain to Route53. – Mark B Apr 22 '16 at 20:20
  • Mark is correct. Can you move the entire domain to route 53 and manage the DO records for DO resources from there? – Rodrigo Murillo Apr 23 '16 at 15:53
  • After doing some testing via the API as well as console, I don't see that is possible to sub delegate using Digital Ocean DNS. – imperalix Apr 23 '16 at 23:33

2 Answers2

6

You need to delegate the DNS subdomain aws.example.com to Route 53.

See Creating a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain

You can create a subdomain that uses Amazon Route 53 as the DNS service without migrating the parent domain from another DNS service.

The basic steps are:

  1. Create an Amazon Route 53 hosted zone for the subdomain.
  2. Add resource record sets for the new subdomain to your Amazon Route 53 hosted
  3. Update the DNS service for the parent domain by adding name server records for the subdomain provided in Step 1.

Assuming the current TLD example.com is hosted at Digital Ocean, then you need to create NS resource records there for the aws subdomain, using the name servers Route 53 provides you when create the hosted zone for aws.example.com.

Then you can control all hosts *.aws.example.com, including CNAMES for ELBs etc. from Route 53.

Rodrigo Murillo
  • 13,080
  • 2
  • 29
  • 50
  • Please see the update answer, would love your thoughts. I think it's a little more specific to Digital Ocean, because I can't edit or delete the SOA. – ThomasReggi Apr 22 '16 at 19:28
-2

Yes, you can have any number of subdomains whether they are A or CNAME records, just point them to the target (public) IP.

ChrisBint
  • 12,773
  • 6
  • 40
  • 62
  • I have to point `aws.example.com` to the public target ip for AWS Route 53 or a specific eb sever? – ThomasReggi Apr 22 '16 at 16:38
  • Not sure how AWS LB works, but I would assume this has a public IP which maps internally to either other public, or private IPs. You would point your A/CNAME to the first public IP. – ChrisBint Apr 22 '16 at 16:40
  • If I send the root subdomain to a load balancer, how can I set up subdomains of that domain in AWS Route 53? – ThomasReggi Apr 22 '16 at 16:43