Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Friendly names for AWS internal ELBs

I have some internal load balancers in AWS, and they have very long addresses, like

internal-abcdeskhdfksdfkjhsdkjfhksjhdfkjsf-1878388.eu-west-1.elb.amazonaws.com

We have vpn setup so that we have access to the load balancer from our browsers. Is there a way to have a "friendlier" name for such a load balancer? I'd be happy with using something like foo.mydomain.com, where mydomain.com is a public hosted zone, or setting up a private hosting zone. I tried adding a subdomain with alias pointing to the internal ELB, but that doesn't seem to help.

like image 653
ashic Avatar asked Sep 08 '25 03:09

ashic


1 Answers

I got it working with the following:

For a Route53 hosted zone that was created for a domain (say, mydomain.com), I created a record set. I used the following parameters:

Name = mysubdomain Type = A - IPV4 address Alias = Yes Target = internal-abcdeskhdfksdfkjhsdkjfhksjhdfkjsf-1878388.eu-west-1.elb.amazonaws.com

Where the target is the internal load balancer dns name. This allowed me to address the target as mysubdomain.mydomain.com .

dig resolves it to an internal ip address, so as long as I have network access, this works. i.e. this works for both private, and public load balancers.

like image 55
ashic Avatar answered Sep 10 '25 04:09

ashic