Wednesday, March 25, 2015

Forward Domain (Public DNS) to AWS ELB

            Just recently i have deployed a web application on AWS with Amazon web service's crown jewel auto scaling feature. I have deployed 2 tire application with Elastic load balancer with simple multi availability zone load balancing. I have faced few Public DNS related issues and i was not able to find any simplified article to resolve it so i thought of writing one.

   Now, Let me describe the problem statement. After we deployed application and load balancer last thing was to register Elastic load balancer address to GoDaddy domain.

    AWS ELB does not provide IP address because there will be multiple virtual loadbalancer working in back-end to provide high availability therefore AWS ELB provides www name (xxxxx.ap-southeast-1a.elb.amazonaws.com). GoDaddy does not support adding www dns name as A record for root domain resolution.

    Initially we explored GoDaddy Web site forwarding option but it did not seem to be a feasible solution hence we have finalized to use AWS Route 53 as DNS service.



     In order to configure Amazon Rote 53 with AWS ELB as source. first we need to create a hosted zone from AWS Route 53 management console.

  1) Select AWS Route 53 service from the services list and select create Hosted Zone.
  2) Enter the Domain name in Hosted Zone and click on Create


  3) Once the hosted zone is created click Zone name from the Hosted zone page.
   4) Add all 4 Name servers (NS) to Public DNS provider (GoDaddy)
   Once the NS entries are added we can create Alias to point Elastic load balancer if the request comes to www.example.com
   5) Click on Create Record Set to create Alias.
    Enter the root Domain in Name text box. and Enter Elastic load balancer www name to Alias Target and click on create.

  6) Once the Record set is created. Old Domain name www.example.com will point to Elastic Load balancer.

    At this point of Only Route 53 DNS service supports AWS elastic load balancer as source. Other workaround are available but it will cost the performance.