PHPackages                             leverage-php/lambda-skeleton - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. leverage-php/lambda-skeleton

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

leverage-php/lambda-skeleton
============================

011[1 PRs](https://github.com/leverage-php/lambda-skeleton/pulls)PHP

Since Dec 16Pushed 1y agoCompare

[ Source](https://github.com/leverage-php/lambda-skeleton)[ Packagist](https://packagist.org/packages/leverage-php/lambda-skeleton)[ RSS](/packages/leverage-php-lambda-skeleton/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Lambda skeleton
===============

[](#lambda-skeleton)

Introduction
------------

[](#introduction)

This project is designed to make it easier to develop a new AWS Lambda function.

It provides:

- A minimal and empty project which you can base your new Lambda functions on.
- Dev tools like PHPUnit, PHPStan, CS fixer etc.
- Running your function locally, including Xdebug.
- [Bref](https://bref.sh) to run PHP runtime on AWS Lambda.
- [Serverless](https://www.serverless.com) config to easily deploy your function to AWS.
- GitHub Actions workflows to test your code and automatically deploy functions to AWS.

Usage
-----

[](#usage)

To set up a new project, just run:

```
composer create-project leverage-php/lambda-skeleton

```

If you use Docker:

```
docker run -it -v $PWD:/app --rm composer create-project leverage-php/lambda-skeleton

```

It'll create a new folder with a very minimal project and install all dependencies. You also need:

- Copy `.env.dist` to `.env` and set up your env values.
- Edit serverless.yml:

```
#Set up a name of your project. It'll be used in AWS Cloudformation.
service: app

...

functions:
    default:
        #Set up a name for your AWS Lambda function
        name: task-${sls:stage}

```

That's it.

Development
-----------

[](#development)

To invoke your function locally, run:

```
$ bin/local

# With JSON event data
$ bin/local '{"foo": "bar"}'

# With JSON in a file
$ bin/local --file=event.json

```

You can use various dev tools thanks to [leverage-php/toolchain](https://github.com/leverage-php/toolchain):

`bin/composer` - Composer

`vendor/bin/test`- PHPUnit

`vendor/bin/static` - PHPStan

`vendor/bin/codestyle` - PHP CS Fixer

Deployment
----------

[](#deployment)

To deploy your function, run:

`bin/deploy`

It'll deploy the project installed on your machine to the dev stage.

Github Actions
--------------

[](#github-actions)

There are two predefined workflows to set up Github Actions:

- `on-pull-request.yml` runs your test tools (PHPUnit, PHPStan and CS fixer) after creating a pull request.
- `on-push-main.yml` deploys your function to AWS to staging after pushing changes to the main branch.

PHP config
----------

[](#php-config)

PHP is configured by Bref and contains optimized settings for AWS runtime. In case you need to change them, just create a folder `php/conf.d` in the root of your project and put your `php.ini` there.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/752c7d73a901e4127eb085e33a61da585b8616b0effa0e9602fb52ea1d33c012?d=identicon)[avfletch](/maintainers/avfletch)

---

Top Contributors

[![yevhen-minenko](https://avatars.githubusercontent.com/u/103666907?v=4)](https://github.com/yevhen-minenko "yevhen-minenko (9 commits)")

### Embed Badge

![Health badge](/badges/leverage-php-lambda-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/leverage-php-lambda-skeleton/health.svg)](https://phpackages.com/packages/leverage-php-lambda-skeleton)
```

PHPackages © 2026

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