0% found this document useful (0 votes)
13 views16 pages

06 Classic Load Balancer

1. The document describes the steps to create and deploy a classic load balancer in AWS including: creating a security group, launching two EC2 instances in different availability zones, creating a classic load balancer, and associating the load balancer with the instances. 2. Key steps include creating a security group to allow HTTP and SSH traffic, launching two instances in different availability zones using the security group and user data to install and start an Apache web server, creating a classic load balancer and associating it with the instances, and testing the load balancer by accessing the DNS name in a web browser. 3. When completed, traffic will be load balanced across the two web server instances launched in different availability zones using the classic load

Uploaded by

Milind Tailor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views16 pages

06 Classic Load Balancer

1. The document describes the steps to create and deploy a classic load balancer in AWS including: creating a security group, launching two EC2 instances in different availability zones, creating a classic load balancer, and associating the load balancer with the instances. 2. Key steps include creating a security group to allow HTTP and SSH traffic, launching two instances in different availability zones using the security group and user data to install and start an Apache web server, creating a classic load balancer and associating it with the instances, and testing the load balancer by accessing the DNS name in a web browser. 3. When completed, traffic will be load balanced across the two web server instances launched in different availability zones using the classic load

Uploaded by

Milind Tailor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Lesson 3 Demo 6

Classic Load Balancer

Objective: To create and deploy a Classic Load Balancer

Prerequisites: AWS free tier Account

Steps to be followed:

1. Creating a Security Group


2. Launching two instances with different Availability Zones
3. Creating a Classic Load Balancer
4. Deploying the Classic Load Balancer to an EC2 instance

Step 1: Creating a Security Group


1.1 Go to the AWS Management Console home page and search for Security Groups.
1.2 Create a Security Group by filling in the basic details as shown in the below screenshots:
1.3 Set the Inbound rules Type as SSH and HTTP with source Anywhere IPv4 as shown in
the below screenshot:

1.4 Click on Create security group.

The Security group has been successfully created.


Step 2: Launching two instances with different Availability Zones
2.1 Launch the first instance with a name, and under the Network settings, provide the
subnet information with an Availability Zone as shown in the below screenshots:
2.2 Select the existing security group, which has been already created.
2.3 Provide the below user data code under the Advanced details:

#!/bin/bash
# Use this for your user data (script from top to bottom)
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1>Welcome to AWSNetworks web-server $(hostname -f)</h1>" >
/var/www/html/index.html
2.4 Click on Launch instance.
2.5 Repeat the steps from 2.1 to 2.4 to launch the second instance.

Note: Provide different availability zones for both the instances.

The instances with different Availability Zones have been launched successfully.

Step 3: Creating and deploying the Classic Load Balancer

3.1 Go to the EC2 console and click on the Load Balancers tab under Load Balancing.
3.2 Click on Create Load Balancer tab.

3.3 Go to the Classic Load Balancer and click on Create.


3.4 Provide a Load Balancer name and click on Next: Assign Security Groups.

3.5 Select an existing security group MyHttpServer and click on Next: Configure Security
Settings.
3.6 Click on Next: Configure Health Check.

3.7 Configure Health Check with the default details as shown in the below screenshot and
click on Next: Add EC2 Instances.
EC2 Instances with different availability zones should be added.

3.8 Select both the instances and click on Next: Add Tags.

3.9 Provide a Key and Value name as per your choice and click on Review and Create.
3.10 Under Review, verify the details and click on Create.

The Classic Load Balancer has been successfully created.


Step 4: Deploying the Classic Load Balancer to an EC2 instance

4.1 Go to the Load Balancer CLB-Demo which is created and check for the details under the
Description tab.

4.2 Go to the Instances tab and check the status for both the instances.

Note: The status needs to be InService which means both the instances are running
successfully.
4.3 Go to the Description tab, copy the DNS name CLB-Demo-1514223846 us-east-
1.elb.amazonaws.com and paste it into a new web browser to see the deployment.
The deployment of Classic Load Balancer to an EC2 instance has been completed while the
user data script is running successfully.

You might also like