1

I am a developer, not a cloud expert, but I have learnt that having knowledge in many areas is key to success.

I have a AWS EKS cluster, in which I have a public load-balancer service (check it out; it's a simple NodeJS Express API).

I also have a domain on Route 53 along with a pending ACM SSL certificate.

I was wondering what I have to do to map my Route 53 domain to my load-balancer, so I don't have to use the extremely long domain name AWS provides as a default for the load-balancer.

Or maybe another way of putting it: how do I change the default domain name of my load-balancer to a Route 53 domain?

chai
  • 418
  • 6
  • 17
  • You can do this on Route53 console, just goto your hosted zone and create a type "A" record, select "Alias" and type in your ALB address as the value. – gohm'c Dec 22 '21 at 14:43
  • Hi @gohm'c, I tried what you suggested, but when I entered my domain into the browser, it says that the site cannot be reached (DNS_PROBE_FINISHED_NXDOMAIN) – chai Dec 22 '21 at 14:47
  • Note the domain that you hosted must be a registered one. Otherwise wait for a while (5~10mins) for the new DNS record to be ready on the web. – gohm'c Dec 22 '21 at 14:49
  • Yeah, I think I just had to be patient and wait for it to do its thing. Thanks so much, it's working! – chai Dec 22 '21 at 14:55

2 Answers2

2

Route53 supports alias records to AWS resources.

enter image description here

This is an extension to classic DNS management. It is still an A (or AAAA) record, but you can point it to an AWS resource and not an IP.

kgiannakakis
  • 103,016
  • 27
  • 158
  • 194
2

The Route53 record provides you the option to choose the target Load Balancer to get pointed to. To do so, once you enter in AWS Console:

  • Route53.

  • Choose the corresponding Hosted Zone.

  • Mark the target Route53 record.

  • Edit record.

  • In the section Route traffic, we have to choose:

    • 1- Alias to Application and Classic Load Balancer.
    • 2- Choose the region where the Load Balancer exists.
    • 3- In the 3rd field, you have to paste the load balancer endpoint.

This is to do so manually, if you're seeking to do so via code, then you can check How can I create a Route 53 Record to an ALB? (AWS).

Rshad Zhran
  • 496
  • 4
  • 17