finds.dev← search

// the find

Kludex/mangum

★ 2,125 · Python · MIT · updated May 2026

AWS Lambda support for ASGI applications

Mangum wraps any ASGI app (FastAPI, Starlette, Django, Quart) so it runs as an AWS Lambda handler. It translates between Lambda event formats and the ASGI scope/receive/send interface. If you want to deploy a Python web framework to Lambda without rewriting anything, this is the standard way to do it.

Covers all four Lambda invocation surfaces — API Gateway REST, API Gateway HTTP, ALB, Function URLs, and Lambda@Edge — in separate handler modules rather than one tangled conditional. GZip and Brotli compression support is built in, which matters on Lambda where response size affects latency and cost. The lifespan protocol implementation means FastAPI startup/shutdown events (database connection pools, etc.) actually fire, which most Lambda adapters quietly skip. The codebase is small enough to read in an afternoon: the core adapter is under 200 lines.

WebSocket support is absent. API Gateway WebSocket APIs use a completely different event model, so if you need persistent connections you're on your own. Lambda@Edge has stricter payload limits and header restrictions than regular Lambda, and Mangum doesn't warn you when your response would violate those constraints — you find out at runtime. The docs live on a third-party domain (fastapiexpert.com) rather than the repo, which is an odd dependency for a project that isn't affiliated with that site. Cold start behavior is entirely up to the user — Mangum does nothing to reduce initialization time, so pairing it with a heavy framework like Django on a cold Lambda will still be slow.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →