I'm setting up a load balancer for the first time so please bear with me as I try to provide as much detail (I'll be checking back on this question every 15 minutes so I can speedily reply to any answers that request my clarification.)

I bought a domain from godaddy.com, but to my understanding configuring the load balancer would be more straight forward if I used amazon's DNS service Route 53.

To my understanding an alternative to using Route 53 would be to go to the godaddy control panel for mydomain.com, set an A record with the elastic ip of an instance that has a rewrite rule to forward all traffic from mydomain.com to www.mydomain.com and then a CNAME record www with the load balancer's address. Ec2 advises not to set an A record for the load balancer's address since that actually address changes.

  1. I launched an ec2 instance running ubuntu 12.04 and lamp-server. ec2-**-**-**-**.compute-1.amazonaws.com is accessible from both the url and ssh.
  2. I created a ec2 load balancer with a ping path of "/" but unfortunately my ec2 instance does not pass the health check for me to add the instance to the load balancer.
  3. I created a hosted zone in Route 53 for my domain name.
  4. I went into godaddy and removed the existing godaddy nameservers and added the 4 nameservers provided by route 53.
  5. Finally I went into Route 53 and created an A record with an Alias Target to the load balancer's address **.us-east-1.elb.amazonaws.com.

My end goal is when somebody goes to mydomain.com the url would be resolved by route 53 and the load balancer would direct traffic to an ec2 instance.

Any ideas on how I can get this to work? (Note: I completed step 5 about 12 hours ago, all DNS changes have propagated since mydomain.com loads a blank page instead of the godaddy template


curl -v localhost returns HTTP/1.1 200 OK

curl -v abcloadbalancer-123124.us-east-1.elb.amazonaws.com. returns HTTP/1.1 503 Service Unavailable: Back-end server is at capacity

curl -v mydomain.com returns HTTP/1.1 503 Service Unavailable: Back-end server is at capacity

The security groups allow from port 80 anyways (

  • 1
    Check that your instance is returning HTTP 200 for the ping path (anything else is considered unhealthy). How are your security groups setup?
    – mgorven
    Sep 29, 2012 at 21:54
  • thx michael - How do I check that my ec2 instance is returning HTTP 200 for the ping path (ie what command do I use)? The security group for my ec2 instance allows inbound tcp 22 and 80. I have made no changes to the firewall on the ec2 instance.
    – user784637
    Sep 29, 2012 at 21:57
  • 1
    On the CLI curl -v <url> will show the HTTP details (there should only be one request and response, i.e. no redirects). Otherwise Firebug in Firefox or something similar can show you that. Do the security groups allow port 80 from anywhere (i.e. including from ELB)?
    – mgorven
    Sep 29, 2012 at 22:00
  • 1
    You should rather edit your question when adding additional information. That response looks correct though. Check the idle timeout issue mentioned in the documentation.
    – mgorven
    Sep 29, 2012 at 22:09
  • 1
    Is the host name abcloadbalancer... the load balanced host name? If yes, then the 503 is most likely due to your ping test failing. Is your web site up and running? Sep 29, 2012 at 22:22

1 Answer 1


Make sure you've added the AWS ELB security group to your instance's security group to be able to access your instances. If you're not allowing the world ( to port 80, you'll need to specifically allow the AWS ELB SG or it wont be able to even hit your server to run the healthcheck.

If you're running on port 80, make sure that you allow amazon-elb/sg-5a9c116a (amazon-elb-sg) in the security group your instance belongs to.

If all of your instances are shown as unhealthy on the ELB, you'll see the 503 error.

  • Thanks Jason - I tried this and unfortunately it did not work. I have tcp port 80 and 22 open to all and ports 0-65535 open to amazon-elb yet the health check for my instance does not pass
    – user784637
    Sep 30, 2012 at 0:42
  • Can you hit the URL configured in the ELB health check successfully directly on the servers? The default healthcheck is /index.html, does that function on the servers in the ELB? Oct 17, 2012 at 22:20
  • Do you see any requests in the Apache access log from the ELB at all? Oct 17, 2012 at 22:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .