Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are the value for Hosted Zone ID different for ELB and Route 53 Alias Target?

Here is my load balancer Sid-LB - the Hosted Zone ID is highlighted:

enter image description here

And this is the Route 53 (hosted zone id is highlighted) when I select the load balancer from Alias Target.

enter image description here

I dont understand why these two IDs have to be different. I tried to send an API call with the payload (containing the ELB hosted zone id) to create the record set, which it creates but doesnt work. How is this Alias Hosted Zone ID for Route 53 generated and does it have any connection with the ELB Hosted Zone ID??

like image 244
Siddharth Avatar asked Feb 18 '16 11:02

Siddharth


People also ask

What is the difference between Route 53 and ELB?

ELB distributes traffic among Multiple Availability Zone but not to multiple Regions. Route53 can distribute traffic among multiple Regions. In short, ELBs are intended to load balance across EC2 instances in a single region whereas DNS load-balancing (Route53) is intended to help balance traffic across regions.

What is hosted zone in load balancer?

A hosted zone is a container for records, and records contain information about how you want to route traffic for a specific domain, such as example.com, and its subdomains (acme.example.com, zenith.example.com). A hosted zone and the corresponding domain have the same name.

What is Route 53 zone ID?

Route 53 allows you to create a second (or third, etc.) hosted zone with 4 different name servers. Also, of course, it makes sense to have this information locally to avoid making unnecessary API requests, which can cost time and money. The hosted zone id is, as you likely noticed, also visible in the console.


2 Answers

You can get the Hosted Zone ID of Elastic Load Balancing here: https://docs.aws.amazon.com/general/latest/gr/elb.html

In your case I can see that the Hosted Zone ID is the one for US West (Oregon) - us-west-2.

like image 113
null Avatar answered Sep 19 '22 03:09

null


The docs are a little vague about this:

This value appears automatically based on the value that you selected or entered for Alias Target.

However, the Alias Hosted Zone ID is not the same as the Hosted Zone ID. To create an Alias record, you just need the Hosted Zoned ID. Check out some of the sample requests provided here. They all take a HostedZoneId parameter.

So for your use case, I think you can just ignore it. All you need to know is that the 'Hosted Zone ID' and an Alias record's 'Alias Hosted Zone ID' are not the same thing.

like image 35
mickzer Avatar answered Sep 21 '22 03:09

mickzer