amazon-web-servicesamazon-ec2load-balancingnameservers

A(Host) Records with AWS Load Balancer


I have a question regarding AWS Load Balancers.

I can point my CNAME www to my load balancer's DNS perfectly and i know it will always work, BUT I also need to point the @ record to the load balancer so people can access mysite.com instead of www.mysite.com and hit the loadbalancer.

The problem is that the A Records have to point an IP Address so i can't point to the DNS and the IP of the load balancer keeps changing so mysite.com stops working.

Can anyone recommend me a work around for this?


Solution

  • Here are the steps.

    1. Click create record set
    2. For zone apex record just leave the name field blank
    3. Select the type of alias you want to make A or AAAA (all steps after this are the same for both types)
    4. Select the yes radio button.
    5. Open the EC2 console in another tab and navigate to the list of your load balancers. Click on the load balancer and look at the description tab in the pane below the list. Sample output below

    enter image description here