COG - LAMP/LEMP: Web Server Stack for AWS

launch

The combination of Linux, Apache, MySQL, and PHP, commonly know as the LAMP stack, is a tried and true Web development environment that is extremely popular. Cloud Ops Group LAMP improves on that stack by offering NGINX instead of Apache, MariaDB instead of MySQL, and the latest PHP. Offering the latest technology for providing the latest in speed, reliability, and security.

Why LEMP Over Traditional LAMP?

  • NGINX instead of Apache - NGINX uses an event-driven architecture that handles thousands of concurrent connections with significantly lower memory consumption, making it ideal for high-traffic websites and applications behind load balancers.
  • MariaDB instead of MySQL - MariaDB offers improved query performance, additional storage engines, and full MySQL compatibility while remaining truly open source with an active development community.
  • PHP 8 - PHP 8 delivers up to 3x performance improvements over PHP 7 through the JIT compiler, along with modern language features like named arguments, attributes, and union types.
  • HTTP/2 enabled by default - Multiplexed connections, header compression, and server push reduce page load times without application changes.
  • AWS CodeDeploy agent pre-installed - Deploy application updates with zero-downtime rolling deployments directly from your CI/CD pipeline without manual SSH sessions.

What Is Included

  • 64-bit Linux operating system
  • Latest PHP 8.x
  • NGINX with HTTP/2 configured
  • MariaDB database server
  • AWS CodeDeploy agent

Use Cases

PHP Web Applications - Host Laravel, Symfony, WordPress, Drupal, or custom PHP applications with a stack optimized for modern frameworks. The pre-configured NGINX server blocks and PHP-FPM pools let you deploy your first application within minutes of launch.

CI/CD-Driven Deployments - Use the pre-installed AWS CodeDeploy agent to automate application deployments from your existing pipeline. Push code to your repository, trigger a deployment, and CodeDeploy handles rolling updates across your fleet with automatic rollback on failure.

Development and Staging Environments - Spin up identical environments for development, staging, and production using the same AMI. Consistent configurations across environments eliminate "works on my machine" issues.

AWS Integration

The AMI is designed to work seamlessly within the AWS ecosystem:

  • AWS CodeDeploy - Automated deployments with zero-downtime strategies
  • Elastic Load Balancing - NGINX is configured for proper health check responses and proxy header forwarding
  • Amazon CloudWatch - Standard system metrics available for monitoring
  • EC2 Auto Scaling - HVM instances support all current-generation instance types for flexible scaling

Getting Started

  1. Launch AMI from the Amazon Marketplace
  2. Use SSH, sftp, or rsync to upload content to /mnt/www/default.
  3. Open a Web browser and type the public DNS name provided by Amazon into the URL bar.

Requirements and Limitations

  • Domain registration and DNS configuration are not included.
  • Email delivery service (e.g., Amazon SES) must be configured separately.
  • Managed backups are the customer's responsibility (consider AWS Backup or snapshots).
  • This AMI includes a local database; for production high-availability, consider migrating to Amazon RDS.
  • SSL/TLS is not configured by default. It's recommended to place instance behind load balancer or CloudFront.

Security and Maintenance

Cloud Ops Group maintains this product with a focus on security and reliability. The image receives regular updates that include:

  • Kernel patches and security fixes.
  • Package updates for included runtimes.
  • System utility updates for stability and performance.

The image is built with a minimal package set to reduce the attack surface compared to full-featured desktop distributions

Support

For bug reports, feature requests, or general questions, please contact us.