This project demonstrates how to deploy a simple LAMP (Linux, Apache, MySQL-compatible Aurora, PHP) stack application on AWS, designed with scalability, availability, and security in mind following the AWS Well-Architected Framework.
The application is currently hosted and accessible at:
http://54.246.246.212/index.php (for mySQL Database)
🔗 http://54.72.80.82/index.php (For Aurora Database)
- Web Server: Apache running on Amazon EC2 (
LAMP-Server) - Application Language: PHP
- Database: Amazon Aurora (MySQL-compatible) named
lamp_app
The application files are located at /var/www/html and include:
create.php- For creating new recordsdb.php- Handles DB connectiondelete.php- Deletes existing recordsindex.php- Displays all recordsinfo.php- Shows individual record detailsupdate.php- Updates records
- Determine scaling and availability needs
- Secure the application and database
- Estimate expected traffic and performance targets
- Launch an EC2 instance (
LAMP-Server) in a public subnet - Set up security groups to allow HTTP and SSH access
- Deploy Amazon Aurora (
lamp_app) in a private subnet within the same VPC
- Update EC2 instance packages
- Install Apache and PHP
- Ensure
/var/www/htmlis the web root - Configure Apache to serve the PHP files
- Use
db.phpto securely connect the PHP app tolamp_app - Ensure the EC2 instance can reach the Aurora endpoint via VPC networking
- Store DB credentials securely (consider AWS Secrets Manager)
- Upload the PHP files to
/var/www/htmlonLAMP-Server - Configure file permissions
- Import any required initial data into Aurora if needed
- Access the app via the EC2 public IP or domain
- Verify CRUD operations work:
- Create new entries
- View records
- Update entries
- Delete entries
- Use IAM roles for EC2 to securely interact with AWS services
- Enable multi-AZ deployment for Aurora for high availability
- Monitor logs with Amazon CloudWatch
- Backup Aurora DB regularly
- Implement HTTPS with an SSL certificate
- Add Bootstrap for improved UI styling
- Enable HTTPS with Let’s Encrypt
- Attach a custom domain name using Route 53
- Enhance UI/UX for CRUD operations
- Add CloudWatch logging and basic analytics
This project is for educational purposes only and should be adapted before using in production.