This project demonstrates the deployment of a highly available, scalable, and secure PHP web application on AWS. The infrastructure is designed to distribute traffic across multiple Availability Zones, auto-scale based on demand, and securely manage database credentials.
AWS Services Used
- Amazon EC2 & Auto Scaling Group: For dynamic compute capacity.
- Application Load Balancer (ALB): To distribute incoming HTTP traffic across multiple instances.
- Amazon RDS (MySQL): Secure, managed relational database hosted in private subnets.
- AWS Secrets Manager: To securely store and retrieve database credentials.
- Amazon VPC: Network isolation using public and private subnets, and Security Groups.
- Created an Amazon RDS MySQL instance named
countries. - Stored database credentials securely using AWS Secrets Manager.
- Configured Security Groups to allow MySQL traffic (port 3306) strictly from the application servers.
- Deployed an ALB in public subnets across multiple Availability Zones to ensure high availability.
- Configured listener rules and target groups for HTTP traffic on port 80.
- Created an EC2 Launch Template integrating the provided PHP application and startup scripts.
- Configured an Auto Scaling Group (ASG) attached to the ALB.
- Implemented Target Tracking Policies to scale instances dynamically based on CPU utilization.
- Connected to the RDS instance and executed the SQL dump to import the required demographic data for the application.
- Verified application availability via the ALB DNS name.
- Successfully executed queries against the RDS database through the web interface.
