Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (46 sloc) 2.17 KB
title currentMenu introduction previous next
Bref provides runtimes to bring support for PHP on AWS Lambda.
link title
First steps
link title
PHP functions

There is no built-in support for PHP on AWS Lambda. Instead we need to use 3rd party runtimes via the system of Lambda layers.

Bref provides the runtimes (aka layers) needed to run PHP applications, whether they run via HTTP or CLI.

This page is an introduction to the runtimes. The next sections (e.g. PHP functions, HTTP applications) will show how to use them in your project.

Bref runtimes

The name of the runtimes follow this pattern:


Region (<region>)

The <region> placeholder should contain your application's region. You need to use the same region as the rest of your application else Lambda will not find the layer.

Runtime (<layer-name>)

Bref currently provides runtimes for PHP 7.2 and 7.3.

php-73 means PHP 7.3.*. It is not possible to require a specific "patch" version.

Layer version (<layer-version>)

The list of runtime versions is hosted at and is shown below:

<iframe src="" class="w-full h-96"></iframe>


To use a runtime you need to import the corresponding layer into your Lambda. For example using AWS SAM:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
        Type: AWS::Serverless::Function
        Runtime: provided
                - '<the layer ARN here>'

You can read more about this in the next sections.

You can’t perform that action at this time.