Why should you not use AWS Lambda as the Function for Serverless WordPress?

Why Choose Serverless WordPress?

You can click here to read more. https://www.serverless-wordpress.cloud/2024/02/15/building-a-modern-wordpress-full-stack-serverless-architecture/

Popular Serverless FaaS Products on the Market:
AWS Lambda, Google Cloud Functions, Azure Functions, and Alibaba Cloud Function Compute are leading Serverless Function products.

  • AWS Lambda, the earliest player, has a wide ecosystem and powerful features.
  • Google Cloud Functions focuses on event-driven architectures, deeply integrating with the GCP ecosystem.
  • Azure Functions provides a robust development toolkit and seamless integration with Azure services.
  • Alibaba Cloud Function Compute holds strong influence in the Asian region, offering high performance and reliability.

Why Not Choose AWS Lambda for Serverless WordPress Runtime?
Despite AWS Lambda being a prominent FaaS product, resembling Serverless Functions, Lougao opts not to use Lambda for Serverless WordPress deployment for several reasons:

  1. Lambda is more suitable for event-driven applications, adding complexity and performance overhead when adapting it for WordPress, even with the availability of custom images.
  2. Lambda’s custom container image imposes restrictions on the file system, allowing only the /tmp directory to be writable, while other directories are read-only. When you want to embed Nginx or Apache within the image, you have to modify the default directories of Apache server or Nginx server, or you need to customize a PHP container runtime, similar to what Bref does. Deploying Serverless WordPress in this way means that you choose to keep your Docker image independent of the official WordPress Docker image, and you cannot upgrade your Docker image along with the community.
  3. When deploying Lambda in a Virtual Private Cloud (VPC), the need for a NAT Gateway to access the internet incurs a monthly cost of $32.89, even if the business is not operational. This high cost diminishes the cost-saving advantages of Serverless Functions scaling to 0.

Are There Other Options?
Fortunately, Lougao discovered Alibaba Cloud Function Compute, a product similar to AWS Lambda. Compared to Lambda for Serverless WordPress deployment, Alibaba’s Function Compute offers several advantages:

  1. Function Compute’s custom images do not require a web adaptor, allowing users to use any web server to listen on specified ports.
  2. In 2021, Alibaba Function Compute removed the container file system read-only limitation, increasing flexibility. Click here to read more.
  3. When deploying Function Compute in a VPC, users do not need to pay fixed fees for NAT, but instead, costs are distributed across requests.
  4. Users can connect to remote containers through the Function Compute console for debugging, providing helpful insights, although Functions are temporary containers that may be destroyed at any time and recreated when a request comes in.
  5. Pricing for Function Compute is similar to Lambda, with the added benefit of a single instance, multiple concurrency mechanism, making it potentially cheaper in high-concurrency scenarios. Click here to read more.

Additionally, Alibaba Cloud Function Compute entered the Gartner Leader quadrant in 2021, instilling confidence in its selection as the function provider for Full-stack Serverless WordPress.

While AWS is one of the world’s most popular cloud providers, certain factors make it less suitable for deploying Serverless WordPress with the specific requirements of scaling to 0 and request-based billing. Thankfully, Alibaba Cloud’s Function Compute offers a practical solution, making Full-stack Serverless WordPress a reality. The global presence of Alibaba Cloud enables users to achieve Serverless WordPress deployment with optimal cost efficiency.

Leave a Comment

Your email address will not be published. Required fields are marked *