Apache web server with PHP and MySQL support on your Amazon Linux instance (sometimes called a LAMP web server or LAMP stack). You can use this server to host a static website or deploy a dynamic PHP application that reads and writes information to a database.
Challenges:
- The whole LAMP configuration is done using a cloud formation template.
- The manual process of deployment was updated to cloud formation automation.
Solution Overview:
- The template is compatible with both CPU-based architecture.
- Different versions of PHP and databases can be easily configured using this cloud formation template.
- Database connection-related parameters can be passed in this cloud formation template.
- System manager setup is done to get terminal access to the server.
- Cloudwatch agent is installed on the server, which sends resource utilization data and logs to the AWS console, which can be processed to trigger automated alerts if they cross resource threshold limits.
- Apache is configured according to the parameters that are passed in the template.
Git Repo: https://github.com/kkpkishan/aws-lamp-cf.git
Steps:
- Create LAMP automation using CloudFormation.
List of AWS resources that will be created by this cloud formation template:
- IAM Role — SSM and CloudWatch Access
- Security Group
- EC2 instance
- EBS volume
- CloudWatch log stream
- SNS Topics