3.4 Create an Elastic Load Balancer

Learning Objectives

By the end of this lesson you will be able to:

Create an Elastic Load Balancer

Create an Elastic Load Balancer. NOTE: Be sure that the instances you are load balancing are running an HTTP server on port 80.

  1. Go to EC2 page of the AWS Management Console: https://console.aws.amazon.com/ec2/ and select the Load Balancers link on the left panel.
  2. Then, click Create Load Balancer. Give the load balancer a name. Leave the defaults for port 80 and click Continue.
  3. You will change the Ping Path to just a forward slash instead of index.html. This way any request that goes to the root path will be part of the health check. Click the Continue button.
  4. On the Add EC2 instances step, select the checkboxes next to the two EC2 instances you created before, that will be part of the load balancer, and click Continue.
  5. Review your settings and click Create. Click Close.
  6. The load balancer now appears in the list of load balancers. Select the checkbox next to your load balancer. A set of tabs opens with more detail about your load balancer. To test your load balancer, copy the DNS Name for the A record and paste it into the address field of your web browser. If your load balancer is working, you will see the default page of your EC2 instance connected to your load balancer.
  7. Select the checkbox next to your load balancer and click the Yes, Delete button..