DEV Community

Sushant Deshpande
Sushant Deshpande

Posted on

Deploying a Web Application using AWS EC2 and Application Load Balancer – Hands-on Project

Cloud infrastructure allows us to build highly available and scalable applications. In this project, I implemented a simple cloud architecture using AWS EC2 instances and an Application Load Balancer to distribute traffic across multiple servers.

The goal of this project was to understand how load balancing works in real-world cloud environments.


Project Overview

In this project, I created a simple web application and deployed it using AWS infrastructure. The application is served by multiple EC2 instances, and the traffic is distributed using an Application Load Balancer.

This setup ensures that if one server fails, the application can still run smoothly through another server.


Architecture

The architecture of the project is simple but demonstrates a real-world cloud deployment model.

User

Application Load Balancer

Target Group

EC2 Instances running Nginx Web Server

The Load Balancer distributes incoming requests across multiple EC2 instances to ensure better performance and high availability.


Technologies Used

  • AWS EC2
  • AWS Application Load Balancer
  • AWS Target Groups
  • Nginx Web Server
  • HTML & CSS
  • GitHub Pages

Step-by-Step Implementation

  1. Launch EC2 Instances

First, I created two EC2 instances using the AWS Free Tier.
These instances act as web servers that host the application.

Each instance was configured with Nginx Web Server using EC2 User Data so that the website gets deployed automatically during instance launch.


  1. Deploy Website on Instances

The website includes:

  • Welcome page
  • User login form
  • Suggestion input field
  • Project description section

This simple interface helps demonstrate how the application is served through the cloud infrastructure.


  1. Configure Target Group

Next, I created a Target Group in AWS.

The EC2 instances were registered as targets, allowing the load balancer to monitor their health and distribute traffic between them.


  1. Create Application Load Balancer

An Application Load Balancer (ALB) was created to handle incoming traffic.

The load balancer forwards requests to the target group, which then routes them to available EC2 instances.

This ensures traffic distribution and improved reliability.


  1. Configure Security Groups

Security groups were configured to allow:

  • HTTP traffic on port 80
  • SSH access for instance management

This allowed users to access the website publicly.


  1. GitHub Deployment

The website code was uploaded to GitHub, and GitHub Pages was used to host the static version of the website.

Live website:
https://sushantdeshpande.github.io/sushant-load-balancer-project/

GitHub Repository:
https://susshantdeshpande.github.io/sushant-load-balancer-project/


Key Learnings

Through this project, I learned:

  • How to launch and configure EC2 instances
  • How AWS Application Load Balancer distributes traffic
  • How Target Groups manage backend servers
  • How to deploy a static website using GitHub Pages
  • How cloud infrastructure ensures high availability

Conclusion

This project helped me gain practical experience in deploying a cloud-based web application using AWS services.

Understanding how load balancing works is an essential skill in modern cloud and DevOps environments. Even a simple architecture like this demonstrates the core principles of scalable and fault-tolerant systems.


Author

Sushant Deshpande

Interested in Cloud, DevOps, and scalable infrastructure.

Top comments (0)