Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross Account Alias Records

Is it possible to create an Alias record in Route 53 to a resource in another AWS account?

Use Case:

I have 2 AWS accounts. My domain is configured with a hosted zone in account A and I have an ELB in account B. I want to create a record to my ELB in account B for my domain's zone apex - which has to be configured in account A.

Does anyone know how I can get around this? I know I can go through billing support to have the domain transferred to account B but I would prefer not to do this. Also, it is not viable for me to migrate the resources from account B to account A.

like image 480
mickzer Avatar asked Mar 10 '16 22:03

mickzer


People also ask

What are alias Records?

An ALIAS record is a type of DNS record that points your domain name to a hostname instead of an IP address.

What is Route 53 alias record?

Amazon Route 53 alias records provide a Route 53–specific extension to DNS functionality. Alias records let you route traffic to selected AWS resources, such as CloudFront distributions and Amazon S3 buckets. They also let you route traffic from one record in a hosted zone to another record.

What is the difference between CNAME and alias record?

Understanding the differencesThe CNAME record maps a name to another name. It should only be used when there are no other records on that name. The ALIAS record maps a name to another name, but can coexist with other records on that name.

What is a CNAME record AWS?

In CloudFront, an alternate domain name, also known as a CNAME, lets you use your own domain name (for example, www.example.com) in your files' URLs instead of using the domain name that CloudFront assigns to your distribution.


1 Answers

So I've found the solution. You can in fact create an Alias record to a resource in another account.

The answer is in the documentation although it's description is a little vague in my opinion. See here under the ELB heading.

If you used different accounts to create your Amazon Route 53 hosted zone and your load balancer – Enter the value that you got in the procedure Getting the DNS Name for an ELB Load Balancer.

As a result, here's what I did:

  1. Copied my ELB DNS name from account B
  2. In account A, I created an Alias record for my zone apex (type: IPv4) and I simply pasted in the DNS name into the text field.

I saved the record and it worked straight away.

After you paste in your ELB's DNS name, you'll notice that the Alias Hosted Zone ID matches the Hosted Zone ID in your ELB's description tab.

like image 100
mickzer Avatar answered Oct 04 '22 18:10

mickzer