Deploy a simple HTML app on EC2 with Auto Scaling + Load Balancer.
Instances scale automatically on load and serve unique pages to show distribution.
This project demonstrates a simple scalable web application hosted on AWS.
The application uses EC2 instances behind an Elastic Load Balancer (ELB) with an Auto Scaling Group (ASG) to automatically handle varying traffic loads.
The web page displays a welcome message along with the server's private IP, showing that multiple instances are running and scaling in real-time.
This project is ideal for learning AWS Auto Scaling, Load Balancing, and basic web deployment in a hands-on way.
Here’s the architecture of the scalable web app using AWS services:

Description: EC2 instances are automatically scaled by the Auto Scaling Group (ASG) and placed behind an Application Load Balancer (ALB) to handle traffic efficiently.
-
Scalable Web App: Automatically scales EC2 instances based on traffic using AWS Auto Scaling.
-
Load Balanced: Distributes incoming traffic across multiple instances via AWS Application Load Balancer (ALB).
-
Simple HTML Page: Serves a basic web page from each EC2 instance to verify scaling.
-
Hands-On AWS Learning: Demonstrates real-world deployment concepts like EC2, ALB, and ASG.
-
Minimal Setup: Uses Launch Templates and User Data for automatic instance setup.
Here’s a view of the web page served by EC2 instances:
-
Visit the Application Load Balancer URL in your browser:
http://<your-alb-dns-name> -
You will see a simple web page:
"Welcome to Scalable App" with the Server Private IP -
As traffic increases, Auto Scaling launches new EC2 instances automatically
-
Refresh the page multiple times or open in different tabs to see the load distributed across instances via ALB
- Launch EC2 Instance (optional for testing):
- Use Amazon Linux 2 AMI, configure security group for SSH & HTTP
- Create Launch Template:
- Set AMI, instance type, key pair, and security group
- Add User Data script to auto-install Apache & create index.html
- Set up Auto Scaling Group (ASG):
- Attach the Launch Template
- Configure min=1, max=6 instances
- Add desired capacity as 1
- Create Application Load Balancer (ALB):
- Attach Target Group with ASG
- Allow HTTP traffic (port 80)
- Test the deployment:
- Open ALB DNS URL in browser
- Confirm web page is served and scaling works when load increases
- Clone the repository:
git clone https://github.com/your-username/scalable-web-app.git
cd scalable-web-app- The EC2 instances in this project are automatically configured using User Data during launch:
-
Go to Launch Templates → Advanced Details → User Data.
-
Paste or upload your setup script there.
-
This ensures every new EC2 instance is automatically ready to serve the web page without manual installation of Apache or uploading files making the Auto Scaling Group fully automated and consistent.
- Hands-on experience with AWS Auto Scaling to dynamically adjust EC2 instances based on traffic.
- Understanding Application Load Balancer (ALB) for distributing incoming requests across multiple servers.
- Practical use of Launch Templates and User Data scripts to automate server setup.
- Learned how to deploy a simple web application in a scalable and reliable way.
- Gained insight into cloud architecture best practices for high availability and fault tolerance.
This project is licensed under the MIT License - see the LICENSE file for details.
Nishika Jaiswal
Aspiring Cloud & DevOps Engineer
