---
title: "Keeping it Bref: Sentry now supports PHP on AWS Lambda"
description: "The new sentry/sentry-bref integration reports PHP errors on AWS Lambda that the Sentry SDK cannot see from inside PHP-FPM, such as timeouts (Bref kills PHP-FPM 1 second before the Lambda deadline) and responses over the 6 MB limit."
url: "https://swe.quest/articles/keeping-it-bref-sentry-now-supports-php-on-aws-lambda-57aed80b39dce9ab"
canonical: "https://blog.sentry.io/sentry-bref-php-aws-lambda/"
source: "Sentry"
published: "2026-11-18"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["php","serverless","observability","cloud"]
---

# Keeping it Bref: Sentry now supports PHP on AWS Lambda

A post on [Sentry](https://swe.quest/sources/sentry.md), published 2026-11-18, 4 min read, Announcement. Original: [https://blog.sentry.io/sentry-bref-php-aws-lambda/](https://blog.sentry.io/sentry-bref-php-aws-lambda/)

## Summary

The new sentry/sentry-bref integration reports PHP errors on AWS Lambda that the Sentry SDK cannot see from inside PHP-FPM, such as timeouts (Bref kills PHP-FPM 1 second before the Lambda deadline) and responses over the 6 MB limit. It hooks into the long-lived Bref runtime around each invocation, boots the Laravel or Symfony app there to reuse its Sentry client, and handles non-HTTP events. For SQS, EventBridge and S3 events it creates one transaction per invocation with an isolated scope per invocation, records cold-start spans (measured in the runtime and passed via /tmp), traces opted-in AWS SDK clients, and links each event to its CloudWatch logs. Timeout reporting only works with Laravel and Symfony, and the cold-start span excludes the time Lambda spends creating the instance before PHP starts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PHP](https://swe.quest/tags/php.md) (Languages)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- AWS Lambda basics ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- PHP-FPM ([easy posts on PHP](https://swe.quest/tags/php.md?difficulty=easy))
- Sentry SDK ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

Bref, Sentry, AWS Lambda, PHP-FPM, Laravel, Symfony, CloudWatch, AWS SDK

## Related posts

- [Building Sentry's Laravel AI Integration](https://swe.quest/articles/building-sentry-s-laravel-ai-integration-db97aa7ed43fc2ee.md): Sentry · 2026-09-21 · Medium · 4 min read · PHP, Observability, AI agents, AI for coding
  Sentry's Laravel AI integration, shipped in sentry-laravel 4.27, adds Agent Tracing to Laravel AI agents with no code changes.
- [Simplify Serverless in AWS: How to Use Neon and Ephemeral Environments](https://swe.quest/articles/simplify-serverless-in-aws-how-to-use-neon-and-ephemeral-environments-81cd9c7a09760341.md): Neon · 2025-05-05 · Medium · 10 min read · PostgreSQL, Serverless, CI/CD, Testing, JavaScript
  Neon's serverless Postgres pairs well with ephemeral environments on AWS Lambda because each environment can get its own instant copy-on-write database branch without paying for extra RDS uptime.
- [Modular regression testing framework built on AWS for large-scale systems](https://swe.quest/articles/modular-regression-testing-framework-built-on-aws-for-large-scale-systems-5423a76854a0e19b.md): AWS Architecture Blog · 2026-11-12 · Medium · 14 min read · Testing, Deployment, CI/CD, Serverless, Cloud platforms
  A traffic-replay regression testing framework built on AWS captures production requests and responses, replays a sample against new code in pre-production, and gates deployments on a CloudWatch alarm over the fraction of matching outputs (typically 99.9%).
- [Sentry's Flutter SDK 10.0: Streaming Traces and More Accurate Crash-Free Rates](https://swe.quest/articles/sentry-s-flutter-sdk-10-0-streaming-traces-and-more-accurate-crash-free-rates-a06a0e8843447c28.md): Sentry · 2026-10-14 · Medium · 3 min read · Mobile, Observability
  Sentry's Flutter SDK 10.0 switches tracing to a streaming model that sends finished spans in batches instead of waiting for the whole transaction, with \`Sentry.startSpan\` for custom instrumentation and an opt-out via \`SentryTraceLifecycle.static\`.
- [Squeezing every millisecond: How we rebuilt the Datadog Lambda Extension in Rust](https://swe.quest/articles/squeezing-every-millisecond-how-we-rebuilt-the-datadog-lambda-extension-in-rust-c788e8ecc0f0b212.md): Datadog Engineering · 2025-04-09 · Medium · 9 min read · Serverless, Rust, Performance engineering, Observability, Refactoring & migrations
  Datadog rewrote its AWS Lambda Extension from a Go build of the full Datadog Agent into a purpose-built Rust sidecar (Project Bottlecap), cutting cold start overhead from about 450 ms to 70 ms, memory from 128 MiB to 77 MiB, and binary size from 55 MB to 7 MB.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
