finds.dev

Kludex/mangum

AWS Lambda support for ASGI applications

View on GitHubHomepage ↗

★ 2,125PythonMITupdated May 2026

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,125
Forks
133
Language
Python
License
MIT
Last commit
31 May 2026

// nearby

If mangum isn't quite it.

All repos →