Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News The AWS Serverless LAMP Stack: the Future of PHP or Vendor Lock-in?

The AWS Serverless LAMP Stack: the Future of PHP or Vendor Lock-in?

This item in japanese

In a series of three technical articles, AWS has recently introduced the new "Serverless LAMP stack". But not everyone in the open-source community believes that the successor of the LAMP stack is proprietary technologies from a single vendor, and alternative approaches have been suggested.

LAMP is a well-known software stack for building dynamic web sites and web applications, named as an acronym of the names of its original four open-source components: the operating system Linux, the HTTP server Apache, the database system MySQL and the programming language PHP.  

The new AWS Serverless LAMP Stack suggests instead to build PHP applications with Amazon Lambda and API Gateway in place of Apache, with the goal of overcoming the challenges of horizontal scaling of the traditional applications. The new model separates the application into static and dynamic requests: all dynamic requests are routed to a single Lambda function using a custom runtime layer. The serverless function reads and writes to an Amazon Aurora database that is MySQL compatible. 

The serverless LAMP stack, image source:

"Scalability is an inherent challenge with the traditional LAMP stack," explains the author Benjamin Smith, senior developer advocate for serverless at AWS. He highlights in the articles the main benefits of the new approach:

Replacing the HTTP server frees developers from the responsibilities of web server maintenance, configuration, synchronization and scaling. PHP development teams can focus on shipping code without changing the way they build.

Even with the traditional LAMP stack, the components are interchangeable and not limited to the original Linux, Apache, MySQL, and PHP or a traditional deployment where extra capacity is achieved with more web servers.

Traditional LAMP stack, image source:

But since its creation, the LAMP model has been relying on free and open-source software and not everyone sees the benefits of relying on AWS services to reduce complexity and increase elasticity. Peter Zaitsev, co-founder of Percona and open-source advocate, called the AWS paradigm "the new Very Proprietary Serverless LAMP stack to lock you in forever."

Pete Johnson, principal architect at Cisco, describes instead an alternative serverless LAMP stack, FONK: a Functions-as-a-Service (FaaS) runtime, an object store, and a NoSQL server, with the entire stack installable on top of Kubernetes.

While that (serverless) requires about half as much code and configuration, it also locks you into AWS (...) What if you could create a design pattern similar to LAMP but that used serverless concepts on top of K8S to insure portability?

To run instead PHP as a serverless function on AWS, Matthieu Napoli created Bref, an open-source project that brings support for PHP and its frameworks to AWS Lambda.  But regardless of the serverless approach, the LAMP stack is here to stay. From Google to Microsoft, the major providers offer blueprints and tutorials to deploy it on public cloud, and the components of the stack retain high popularity in the latest Stack Overflow’s Developer Survey.

Rate this Article