Building a PHP 8.4 Lambda Runtime: Performance Analysis

Why Build Your Own Runtime?

Bref is the most popular way to run PHP on AWS Lambda, and for good reason—it’s well-maintained and gets the job done. However, there are situations where building your own runtime makes sense: you need a specific PHP version before Bref supports it, you want particular extensions, or you simply prefer working with standard PHP patterns without additional abstractions.

This post documents a fully functional PHP 8.4 runtime running on ARM64, complete with performance benchmarks. Consider it a clearly documented alternative to Bref for teams who want complete control over their PHP Lambda environment.

[Read More]

Building Multi-Architecture AWS Lambda Functions with Bref PHP and PostgreSQL

The Multi-Architecture Challenge

With the rise of Apple Silicon (ARM64) and the continued use of Intel-based (x86_64) systems, developers face increasing challenges in creating applications that work seamlessly across both architectures. This is especially true for PHP developers working with AWS Lambda, where subtle differences can lead to frustrating issues.

Example with Bref PHP Runtime + PDO PostgreSQL Extension

To address these challenges, I’ve created a comprehensive example repository that demonstrates a working multi-architecture implementation of PHP Lambda functions using Bref and PDO PostgreSQL. This example focuses on:

[Read More]