0% found this document useful (0 votes)
24 views5 pages

LA 3 Week 3

Uploaded by

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

LA 3 Week 3

Uploaded by

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

School of Computer Science Engineering and Technology

Course- B.Tech./BCA /MCA Type- Elective


Course Code –CSET358/CBCA255/CMCA559 Course: Cloud Infrastructure &
Services

Year- 2023
Date- 21-08-2023 Batch- 2020, 2021-22

Objective: Apply AWS Load Balancing and Auto Scaling for EC2 Instances.
The objective of this lab assignment is to familiarize you with the concepts of Load Balancing
and Auto Scaling in Amazon Web Services (AWS). You will learn how to set up a load balancer
to distribute incoming traffic across multiple EC2 instances and configure Auto Scaling to
automatically adjust the number of instances based on traffic load.

Lab Architectural Diagram

Prerequisites:
1. An AWS account with appropriate permissions to create and manage EC2 instances,
Load Balancers, and Auto Scaling groups. We are using AWS Academy Learner Lab so
below instructions you need to see before using IAM roles as LabRole.
School of Computer Science Engineering and Technology

2. Basic understanding of Amazon EC2 instances (Covered in Lecture as well in Lab 2)


and networking concepts (VPC, Subnet, CIDR, Router and Gateway and Route Table)
will be explained by Lab Instructor in brief (20 Minutes)
3. Lab Environment Setup (your AWS Management Console) using Learner Lab Sandbox
Environment.

Activity 1: Load Balancing


Create an Application Load Balancer to distribute the load of two application webserver (EC2
Instances) also add one more web server (EC2 Instance) on the existing Load Balancer.

Please note that third EC2 instance should be created in the same VPC and different
Availability Zone.
School of Computer Science Engineering and Technology

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-application-load-
balancer.html

Lab Activity: 2 Auto Scaling


Introduction: Demonstration of AWS Autoscaling Group, Target Group with EC2 Instances.
1. Scaling is the ability to increase or decrease the compute capacity of your application
either by changing the number of servers (horizontal scaling) or by changing the size
of the servers (vertical scaling).
2. Auto Scaling helps you maintain application availability and allows you to scale your
Amazon EC2 capacity up or down automatically according to the defined conditions.
You can use Auto Scaling to help ensure that you are running your desired number of
Amazon EC2 instances.
3. Auto Scaling can also automatically increase the number of Amazon EC2 instances
during demand spikes to maintain performance and decrease capacity during lulls to
reduce costs.
4. Auto Scaling is well suited to applications that have stable demand patterns, or that
experience hourly, daily, or weekly variability in usage.

Official AWS Web Url:


https://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html
Submit the screenshots document through the submission method
School of Computer Science Engineering and Technology

Rough Cuts/ Step by Step Explanation:


Task 1: Navigate to the EC2 Dashboard.
Click on "Launch Configurations" in the left navigation pane.
Click on "Create launch configuration."
Choose an Amazon Machine Image (AMI) of your choice.
Select an instance type and configure instance details.
Configure storage and add any additional configuration as needed.
Configure security groups to allow necessary traffic.
Create choose an existing role (LabRole) to grant necessary permissions.
Review the configuration and create the launch configuration.
Task 2: Create an Auto Scaling Group:
After creating the launch configuration, click on "Create Auto Scaling group" in the success
message.
Choose the launch configuration you created.
Configure the group size settings (initial instances, minimum instances, desired instances,
maximum instances).
Configure scaling policies based on your preference (e.g., target tracking scaling).
Configure notifications if desired.
Configure tags for instances.
Review the configuration and create the Auto Scaling group.
Task 3: Create a Load Balancer:
Navigate to the EC2 Dashboard.
Click on "Load Balancers" in the left navigation pane.
Click on "Create Load Balancer."
Choose the appropriate load balancer type (e.g., Application Load Balancer).
Configure the basic settings, listeners, and availability zones.
Configure security settings and add any required certificates.
Configure routing if needed (e.g., target groups).
Review and create the load balancer.
School of Computer Science Engineering and Technology

Task 4: Attach Load Balancer to Auto Scaling Group:


In the EC2 Dashboard, navigate to the Auto Scaling group you created.
Click on the "Edit" button.
In the "Load balancing" section, select "Add load balancer."
Choose the load balancer you created and configure the health check settings.
Save the changes.
Task 5: Test Load Balancing and Auto Scaling:
Obtain the DNS name of the load balancer from the Load Balancers section.
Open a web browser and access the load balancer's DNS name.
Observe how traffic is distributed among the instances.
Increase the traffic load (e.g., use a load testing tool or manually refresh the page).
Monitor the Auto Scaling group and observe how new instances are launched to handle
increased traffic.

Additional Assignment (Optional)


Students, who has performed the above assignment in Cloud Specialization Core Courses
now they need the perform below Lab.

IaC: Create an Auto Scaling Group & Application Load Balancer with AWS CloudFormation.

Please remember that we can use US-East-1a and Us-West-2b Region only.
https://towardsaws.com/iac-create-an-auto-scaling-group-application-load-balancer-with-
aws-cloudformation-6ff154afdec7

You might also like