This repository has been sanitized to remove all sensitive cloud resource identifiers, including login credentials, security group names, public IPs, VPC and subnet IDs, and resource deletion steps. Any environment-specific values presented (such as sample firewall rules or admin logins) have been intentionally generic and are used solely for instructional purposes.
All actions documented in this project follow Microsoft Azure best practices for authentication, access control, and resource protection. Always ensure keys, credentials, and infrastructure metadata are stored securely and never pushed to public repositories.
This project demonstrates deploying an Application Load Balancer (ALB) in AWS to distribute traffic across two EC2 instances in separate availability zones. It includes security group setup, target group configuration with health checks, and an exploration of sticky session behavior β providing hands-on experience with scalable and stateful cloud infrastructure design.
- Amazon EC2 β Virtual instance provisioning
- Application Load Balancer (ALB) β Traffic distribution & session persistence
- Target Groups β Instance registration and health monitoring
- Security Groups β Configured for HTTP (80) and SSH (22) access
- AWS Console β Visual deployment and configuration
- PEM Key Pair (xxxxxx) β SSH access to instances
-
Launch EC2 Instances
- Deployed
httpserver1
inus-east-1a
andhttpserver2
inus-east-1b
- Used
ami-06d5e0de6baf595ca
for both - Applied shared security group (
xxx-sg
) allowing SSH & HTTP traffic
- Deployed
-
Create Target Group (
web-tg
)- Set target type: Instances
- Health check path:
/health.html
- Adjusted healthy threshold:
2
- Registered both EC2 instances
-
Configure Application Load Balancer (
web-lb
)- Enabled across all availability zones
- Linked to
xxxx-sg
for security - Default action: Forward to
web-tg
- Verified traffic alternated between both instances via DNS
-
Enable Sticky Sessions (Bonus)
- Activated session affinity on
web-tg
- Validated consistent routing to the same instance across browser refreshes
- Activated session affinity on
- Accessed instances via public IPs to confirm HTTP responses
- Used ALB DNS (
web-lb-xxxxxxxx.us-east-1.elb.amazonaws.com
) to test traffic distribution - Observed round-robin behavior and sticky session persistence
- Performed full teardown: deleted load balancer, target group, and terminated EC2 instances
- Demonstrated cross-AZ deployment using ALB
- Explored health check mechanics and traffic failover
- Implemented session stickiness for stateful client routing
- Practiced full resource lifecycle: deployment β testing β cleanup
This project is for educational purposes and demonstrates AWS infrastructure concepts.