Simple and scalable PHP with serverless
Simplify your infrastructure and scale with ease.
Bref is an open-source project that helps you go serverless on AWS with PHP.
serverless.yml
service: demo
provider:
name: aws
functions:
web:
runtime: php-82-fpm
handler: public/index.php
events:
- httpApi: '*'
requests, jobs, and messages handled with Bref in the last 30 days
We're in 2025. Applications should scale automatically. Hosting should be reliable and cost-efficient. Infrastructure should accelerate development, not consume our time.
Bref deploys PHP applications to AWS Lambda and sets up the rest of the infrastructure using serverless services.
serverless.yml
file. Then deploy to AWS by running serverless deploy
.$ serverless deploy
Deploying demo to stage dev (us-east-1)
✔ Service deployed to stack demo-dev (31s)
endpoint: https://yti4le2q5.lambda-url.us-east-1.on.aws/
functions:
web: demo-dev-web (750 KB)
cron: demo-dev-cron (750 KB)
worker: demo-dev-worker (750 KB)
Serverless means whatever you choose it to mean.
Run PHP as usual, like on any server. Except it scales (almost) infinitely and you don't maintain the infrastructure.
Lift-and-shift existing apps or build new ones with your favorite framework.
Or go the extreme opposite: build event-driven microservices with infinitely scalable cloud services like SQS and EventBridge.
Or anything in between, that works too.
Become a sponsor and help Bref be a sustainable open-source project.
“Bref is excellent. We've been running a Laravel app with it since 2020 and it's currently handling over 160 million requests per month without a hiccup.”
“Bref has been a boon for running our customer's applications. We've had a Laravel API on Bref for the last 12 months serve over 25 million requests with an average response time of 50ms.”
“Just finished migrating our production from Heroku to AWS Lambda via Bref. It'll save us around $2k a year 🤯”
“Every time I throw something up onto AWS Lambda in PHP using Bref I marvel at how mega-useful it is. If you haven’t checked out Bref you’re probably missing out”
“When your production website with Symfony, API Platform and Bref handles more than 500 simultaneous connections without flinching…”
“I’ve been running APIs and websites with Bref in prod for over a year now. It is indeed as simple as you describe it.”
“There is something amazing and magical about Bref and serverless deploying stuff to the cloud.”
“Happily using Bref since 2019 to process millions of requests, jobs and scheduled tasks. It powers the best technical accomplishment of my career and has made me a better software engineer and open-source contributor.”
“The team embraced Bref with lightning speed! We were able to roll out the first parts of our new event-driven architecture within days, crafting new features in a mere fraction of the time it used to take — truly mind-blowing!”
“An incredible project and one we're very proud to use in production for a recent eCommerce project we launched that saw 32 million Lambda invocations last month.”
“Bref defines how PHP should run on AWS Lambda. At Voxie, we sponsor Bref because it's more than a runtime — it's the best foundation for building scalable, efficient products on AWS Lambda.”
Get started with Bref on your own, or get in touch for support and consulting.