Classic Load Balancer

Follow the below steps to create your Load Balancer

Select a Load Balancer type


  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. On the navigation bar, choose a region for your load balancer. Be sure to select the same region that you selected for your EC2 instances.
  3. On the navigation pane, under LOAD BALANCING, choose Load Balancers.
  4. Choose Create Load Balancer.
  5. For Classic Load Balancer, choose Create.

ELB Type

Define your Load Balancer


You must provide a basic configuration for your load balancer, such as a name, a network, and a listener.

  1. For Load Balancer Name, type a name for your load balancer.
  2. For Create ELB inside, select the same network that you selected for your instances: EC2-Classic or a specific VPC.
  3. [Default VPC] If you selected a default VPC and would like to choose the subnets for your load balancer, select Enable advanced VPC configuration.
  4. Leave the default listener configuration.
  5. [EC2-VPC] For Available subnets, select at least one available public subnet using its add icon. The subnet is moved under Selected subnets. To improve the availability of your load balancer, select more than one public subnet.

Define ELB

  1. Choose Next: Assign Security Groups.

Assign Security Groups to Your Load Balancer in a VPC


If you selected a VPC as your network, you must assign your load balancer a security group that allows inbound traffic to the ports that you specified for your load balancer and the health checks for your load balancer.

  1. On the Assign Security Groups page, select Create a new security group.
  2. Type a name and description for your security group, or leave the default name and description. This new security group contains a rule that allows traffic to the port that you configured your load balancer to use.

Secuirty Group

  1. Choose Next: Configure Security Settings.
  2. For this tutorial, you are not using a secure listener. Choose Next: Configure Health Check to continue to the next step.

Listener

Configure Health Checks for Your EC2 Instances


Elastic Load Balancing automatically checks the health of the EC2 instances for your load balancer. If Elastic Load Balancing finds an unhealthy instance, it stops sending traffic to the instance and reroutes traffic to healthy instances.

  1. On the Configure Health Check page, leave Ping Protocol set to HTTP and Ping Port set to 80.
  2. For Ping Path, replace the default value with a single forward slash ("/"). This tells Elastic Load Balancing to send health check queries to the default home page for your web server, such as index.html.
  3. For Advanced Details, leave the default values.
  4. Choose Next: Add EC2 Instances.

Health Check

Register EC2 Instances with Your Load Balancer


Your load balancer distributes traffic between the instances that are registered to it.

  1. On the Add EC2 Instances page, select the instances to register with your load balancer.
  2. Leave cross-zone load balancing and connection draining enabled.

Add Instance

  1. Choose Next: Add Tags. Alternatively, you can register instances with your load balancer later on using the following options:

Tag Your Load Balancer (Optional)


You can tag your load balancer, or continue to the next step. Note that you can tag your load balancer later on; for more information, see Tag Your Classic Load Balancer.

  1. On the Add Tags page, specify a key and a value for the tag.
  2. To add another tag, choose Create Tag and specify a key and a value for the tag.

Add Tags

  1. After you are finished adding tags, choose Review and Create.

Create Your Load Balancer


Before you create the load balancer, review the settings that you selected.

  1. On the Review page, choose Create.

Review

  1. After you are notified that your load balancer was created, choose Close.