Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gzai's avatar
Level 3

Serverless Laravel on AWS with bref deployment error

I want to deploy laravel with bref to aws serverless but stuck with this error

'There is no Bref layer named "php-74-fpm" in region "us-southeast-1"'

I check runtime bref for php-74-fpm in region us-southeast-1 exist.

What am I doing wrong here?

This is my serverless.yml :

service: laravel

provider:
    name: aws
    # The AWS region in which to deploy (us-east-1 is the default)
    region: us-southeast-1
    # The stage of the application, e.g. dev, production, staging… ('dev' is the default)
    stage: dev
    runtime: provided

package:
    # Directories to exclude from deployment
    exclude:
        - node_modules/**
        - public/storage
        - resources/assets/**
        - storage/**
        - tests/**

functions:
    # This function runs the Laravel website/API
    web:
        handler: public/index.php
        timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
        layers:
            - ${bref:layer.php-74-fpm}
        events:
            -   http: 'ANY /'
            -   http: 'ANY /{proxy+}'
    # This function lets us run artisan commands in Lambda
    artisan:
        handler: artisan
        timeout: 120 # in seconds
        layers:
            - ${bref:layer.php-74} # PHP
            - ${bref:layer.console} # The "console" layer

plugins:
    # We need to include the Bref plugin
    - ./vendor/bref/bref
0 likes
2 replies
Agoi's avatar

Hello @gzai, where you able to deploy using bref successfully?

Please or to participate in this conversation.