mangum
AWS Lambda support for ASGI applications
Decision gist · record as of 2026-08-14
Yes. Mangum is actively maintained, permissively licensed, and carries no known vulnerabilities. Install it if you need to run an ASGI application on AWS Lambda or are considering Lambda for an existing ASGI codebase. The single dependency and low friction make adoption straightforward.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; the ASGI application itself must be installed separately.
- Low friction: pure Python wheel with a single runtime dependency (typing-extensions).
- Actively maintained with recent commits and a large user base (6749932 monthly downloads).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) imposes no restrictions on commercial or private use; you may modify and redistribute with attribution.
last release 2026-02-01 (194 days) · last repo commit 2026-08-09 · 2,131 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,749,932 downloads/mo, #1,858 on PyPI
Alternatives
Verify before relying
pip install mangum
from mangum import Mangum
async def app(scope, receive, send):
await send({
"type": "http.response.start",
"status": 200,
"headers": [[b"content-type", b"text/plain"]],
})
await send({"type": "http.response.body", "body": b"Hello, world!"})
handler = Mangum(app, lifespan="off")- Performance characteristics under high concurrency or large payloads on Lambda.
- Compatibility matrix with specific versions of major ASGI frameworks.
- Cold-start overhead compared to native Lambda handlers.
What it is and what it does
Mangum is a bridge that lets you run ASGI-based web applications directly on AWS Lambda. It translates Lambda events from various AWS services—API Gateway, Application Load Balancer, Function URLs, and Lambda@Edge—into the ASGI protocol, then converts the ASGI response back into a Lambda-compatible format. This lets you write your application once using a standard ASGI framework and deploy it to Lambda without rewriting for Lambda's native event model.
The package handles practical deployment concerns: binary media types, payload compression (GZip or Brotli), and ASGI lifespan events for startup and shutdown. It integrates with standard deployment tools like Serverless Framework and AWS SAM, making it straightforward to incorporate into existing Lambda workflows. With a single runtime dependency and low install friction, it's designed to be a thin, transparent adapter.
Use it for
- Deploy an ASGI REST API to Lambda behind API Gateway without rewriting the application.
- Migrate an existing ASGI web app from a traditional server to Lambda with minimal code changes.
- Build serverless web services that handle binary responses via API Gateway.
- Use Lambda@Edge to serve dynamic content from CloudFront with an ASGI application.
- Combine Lambda Function URLs with an ASGI framework for simple HTTP endpoints.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Mangum is actively maintained, permissively licensed, and carries no known vulnerabilities. Install it if you need to run an ASGI application on AWS Lambda or are considering Lambda for an existing ASGI codebase. The single dependency and low friction make adoption straightforward.
Install
mangum on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (typing-extensions). Actively maintained with recent commits and a large user base (6749932 monthly downloads).
Requires Python 3.9 or later; the ASGI application itself must be installed separately.
License in practice
MIT license (permissive) imposes no restrictions on commercial or private use; you may modify and redistribute with attribution.
Quickstart
pip install mangum
from mangum import Mangum
async def app(scope, receive, send):
await send({
"type": "http.response.start",
"status": 200,
"headers": [[b"content-type", b"text/plain"]],
})
await send({"type": "http.response.body", "body": b"Hello, world!"})
handler = Mangum(app, lifespan="off")
Verify before relying
- Performance characteristics under high concurrency or large payloads on Lambda.
- Compatibility matrix with specific versions of major ASGI frameworks.
- Cold-start overhead compared to native Lambda handlers.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 194 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,749,932 / month, #1,858 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP |
Evidence: mangum-0.21.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “asgi lambda adapter”
- mangumMangum adapts ASGI applications to run on AWS Lambda, handling events…
- zappaZappa packages and deploys Python WSGI and ASGI web applications to…
- asgirefProvides ASGI base libraries including sync-to-async and…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also apig-wsgi · awslambdaric · zappa · aws-wsgi · asgi-lifespan · aws-sam-cli · aws-sam-translator · awsgi2 · a2wsgi · aiohttp-asgi-connector