PHPackages                             ignited/laravel-serverless - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ignited/laravel-serverless

Abandoned → [brefphp/bref](/?search=brefphp%2Fbref)Project[Framework](/categories/framework)

ignited/laravel-serverless
==========================

Allows you to run Laravel in Lambda

v0.3(4y ago)71151[1 issues](https://github.com/ignited/laravel-serverless/issues)MITPHPCI failing

Since Nov 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ignited/laravel-serverless)[ Packagist](https://packagist.org/packages/ignited/laravel-serverless)[ Docs](https://github.com/ignited/laravel-serverless)[ RSS](/packages/ignited-laravel-serverless/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (9)Versions (5)Used By (0)

#### Note: this project has been abandoned, in the years the functionality of [Bref](https://github.com/brefphp/bref) has mostly caught up and this package is now redundant.

[](#note-this-project-has-been-abandoned-in-the-years-the-functionality-of-bref-has-mostly-caught-up-and-this-package-is-now-redundant)

[![](https://github.com/ignited/laravel-serverless/raw/master/header.png?raw=trueg)](https://github.com/ignited/laravel-serverless/blob/master/header.png?raw=trueg)

\[ABANDONED\] Laravel Serverless
================================

[](#abandoned-laravel-serverless)

This package makes deploying to Amazon Lambda a breeze. It combines the best of [Bref](https://github.com/brefphp/bref) and [Serverless](https://github.com/serverless/serverless) to bring you an effortless deploy.

[![Build Status](https://camo.githubusercontent.com/67ae7aa01def099d559edc1903a8af01542d2c2a36da33301ca679aa4b80b0c0/68747470733a2f2f7472617669732d63692e6f72672f69676e697465642f6c61726176656c2d7365727665726c6573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ignited/laravel-serverless)[![Total Downloads](https://camo.githubusercontent.com/c006547e2e42c368632323f42097a830d50dbc977788392272d770c34bfdf6a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69676e697465642f6c61726176656c2d7365727665726c6573732e737667)](https://packagist.org/packages/ignited/laravel-serverless)[![Latest Version](https://camo.githubusercontent.com/ede7e807f636f64359ef2d25d57036e26f1e234ca585e3f941e05ad56c45f55e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69676e697465642f6c61726176656c2d7365727665726c6573732e737667)](https://github.com/ignited/laravel-serverless/releases)[![Dependency Status](https://camo.githubusercontent.com/40837dee0b9be0e155035f25f46d99ecffd7d2a3c24b4f353ece17bd7cfd51cd/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f69676e697465643a6c61726176656c2d7365727665726c6573732f62616467652e737667)](https://www.versioneye.com/php/ignited:laravel-serverless)

Quick Start
--------------------------------------------------

[](#quick-start)

1. **Install prerequisites:**

```
npm install -g severless
```

2. **Install via composer:**

```
composer require ignited/laravel-serverless
```

3. **Publish serverless.yml**

```
php artisan vendor:publish --provider="Ignited\LaravelServerless\LaravelServerlessServiceProvider"
```

4. **Deploy to AWS**

```
serverless deploy
```

That's it! The rest is handled by this package. There's quite a lot going under the hood.

Configuration
------------------------------------------------------

[](#configuration)

### Storage

[](#storage)

When running on Lambda - all functions/code are placed into `/var/task`, since the filesystem is read only - Laravel will not be able to write to certain folders.

For that reason this package takes most of the hassle away by creating a `/tmp/storage` folder and reconfiguring Laravel during bootstrap.

Lamda does have a 500MB limit so it is recommended you write straight to an S3 bucket. When dealing with large files upon upload you should use a Signed Storage URL to allow clients to write directly to S3. *More info on this coming soon*.

### Sessions

[](#sessions)

Given the ephemeral nature of a Lambda container it is recommended you only use a `database` cache or `redis` for sessions. This can be configured as normal and provide the options as [SSM secrets](#secrets) or serverless.yml.

### Database

[](#database)

Database can be configured as normal add your configuration to the [environment](#environment) and secrets to the [SSM parameter store](#ssm-secrets).

### Logging

[](#logging)

As Laravel cannot easily write to logs it is recommended that you use `stderr`. This is picked up by Lambda and can be viewed within Cloudwatch.

You can configure this as such:

```
provider:
    ...
    enviroment:
        LOG_CHANNEL=stderr

```

### Cache

[](#cache)

Given the ephemeral nature of a Lambda container it is recommended you only use a `database` cache or `redis` cache. This can be configured as normal and provide the options as [SSM secrets](#secrets) or serverless.yml.

Under the hood
--------------------------------------------------------

[](#under-the-hood)

[Bref](https://github.com/brefphp/bref) takes care of the following:

- Building and disributing the base PHP runtime (PHP 7.2 and PHP 7.3)
- Maintaining PHP-FPM Bootstrap
- Communication with Lambda to parse events

[Serverless](https://github.com/serverless/serverless) takes care of the following:

- Deploying a Cloudformation Stack to build a Lambda Function
- Configuration of API Gateway / Load Balancer
- and much much more...

This package takes care of the following:

- Managing the Laravel bootstrap
- Invoking Laravel CLI based on Lambda events
- Managing storage directories (`/tmp/storage` is used in AWS Lambda as the App base path is not writable)
- Managing Configuration/Secrets via the [SSM Parameter Store](#ssm)

### PHP Versions

[](#php-versions)

Currently [Bref](https://github.com/brefphp/bref) supported runtimes are 7.2 and 7.3.

You can change this by updating the layer reference in `serverless.yml`.

```
(PHP 7.2)
arn:aws:lambda:ap-southeast-2:209497400698:layer:php-72-fpm:14

(PHP 7.3)
arn:aws:lambda:ap-southeast-2:209497400698:layer:php-73-fpm:14

```

### PHP Extensions

[](#php-extensions)

For a full list of supported PHP extensions and to configure more see [Supported Extensions](https://bref.sh/docs/environment/php.html#extensions).

Environment Variables
------------------------------------------------------------

[](#environment-variables)

Environment variables can be added to the serverless.yml file.

For example:

```
provider:
  ...
  environment:
    DB_HOST: "production.db.rds.us-east-1.com"
    DB_DATABASE: "laravel"

```

Note: Secrets should be added to [SSM secrets](#ssm-secrets).

SSM Secrets
--------------------------------------------------

[](#ssm-secrets)

Laravel Serverless will take care of loading configuration and secrets from SSM at runtime. To do this you will need to provide `APP_SECRETS_SSM_PATH` in your `serverless.yml` enviroment:

```
provider:
  name: aws
  runtime: provided
  environment:
    APP_SECRETS_SSM_PATH: "/app/"

```

This will look for any parameters under `/app/` and set them as an `env`.

For example:

```
/app/db_host becomes DB_HOST
/app/db_password becomes DB_PASSWORD
/app/DB_host becomes DB_HOST

```

### Supported Laravel Versions

[](#supported-laravel-versions)

Event TypeSupportedLaravel 5.8✅Laravel 6.0 (LTS)✅### Supported Event Types

[](#supported-event-types)

Event TypeSupportedConsole (Manual Invocation)✅Amazon API Gateway✅Amazon Elastic Load Balancing✅Amazon AlexaComing SoonAmazon Simple Email ServiceComing SoonAmazon SQS (Laravel Queues)Coming Soon### Directory Changes

[](#directory-changes)

DefaultNewstorage/app/tmp/storage/appstorage/bootstrap/cache/tmp/storage/bootstrap/cachestorage/framework/cache/tmp/storage/framework/cachestorage/framework/views/tmp/storage/framework/viewsCredits
------------------------------------------

[](#credits)

- [Laravel Vapor](https://vapor.laravel.com/) for source code inspiration.

Licensing
----------------------------------------------

[](#licensing)

Laravel Serverless is licensed under the [MIT License](./LICENSE.md).

All files located in the vendor and external directories are externally maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms in the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~179 days

Total

4

Last Release

1822d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4acea52d2e5350ba356f1725e9211a118c710aa06c914e544b3a7ba3fd3e415?d=identicon)[alexw23](/maintainers/alexw23)

---

Top Contributors

[![alexw23](https://avatars.githubusercontent.com/u/1505496?v=4)](https://github.com/alexw23 "alexw23 (47 commits)")

---

Tags

laravelserverlesslambdabrefvapor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ignited-laravel-serverless/health.svg)

```
[![Health](https://phpackages.com/badges/ignited-laravel-serverless/health.svg)](https://phpackages.com/packages/ignited-laravel-serverless)
```

###  Alternatives

[bref/laravel-bridge

An advanced Laravel integration for Bref, including Octane support.

3384.1M11](/packages/bref-laravel-bridge)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k49.4M479](/packages/laravel-scout)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
