Search code examples
amazon-web-servicesipamazon-elb

AWS Static IP to Load Balancer?


Is it possible to assign a static IP to an AWS load balancer without the need to move your NS records to Route 53?

I basically just want to create an A record from my domain to point to the ELB.


Solution

  • Elastic Load Balancer is a distributed system. It does not have a single public IP address. Instead, when you create an ELB, you are given a DNS name such as ExampleDomainELB-67854125.us-east-1.elb.amazonaws.com. Amazon gives a facility to set up a DNS CNAME entry pointing for e.g. www.exampledomain.com to the ELB-supplied DNS name.

    Also, ELB is directing to one of your instances. Hence, creating a static IP address for ELB will not be feasible.

    So as a solution if you need to set your 'A' record from your domain pointing to your ELB in Route53 :

    1. Select 'Yes' for Alias.
    2. Set Alias target as your Load Balancer DNS.

    Second way is similar by selecting the CNAME in Route53 and pointing the Alias Target to your ELB.

    This should help.