Create a subdomain that uses Amazon Route 53 as th

2019-06-13 19:52发布

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.

2条回答
姐就是有狂的资本
2楼-- · 2019-06-13 20:33

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

查看更多
Explosion°爆炸
3楼-- · 2019-06-13 20:44

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.

查看更多
登录 后发表回答