Search code examples
amazon-web-servicesamazon-ec2amazon-elbamazon-route53

Does it make sense to have an Amazon Elastic Load Balancer with just one EC2 instance?


My question is simple. Does it make sense to have an Amazon Elastic Load Balancer (ELB) with just one EC2 instance?

If I understood right, ELB will switch traffic between EC2 instances. However, I have just one EC2 instance. So, does it make sense?

On the other hand, I´m using Route 53 to route my domain requests example.com, and www.example.com to my ELB, and I don´t see how to redirect directly to my EC2 instance. So, do I need an ELB for routing purposes?


Solution

  • There is no need to use a Load Balancer if you are only running an single Amazon EC2 instance.

    To point your domain name to an EC2 instance:

    • In the EC2 Management Console, select Elastic IP
    • Allocate New Address
    • Associate the address with your EC2 instance
    • Copy the Elastic IP address and use it in your Route 53 sub-domain

    The Elastic IP address can be re-associated with a different EC2 instance later if desired.

    Later, if you wish to balance between multiple EC2 instances:

    • Create an Elastic Load Balancer
    • Add your instance(s) to the Load Balancer
    • Point your Route 53 sub-domain to the Load Balancer