Menu

I built a zero-dependency API router for AWS Lambda, with a Rust core. Here's what the benchmarks say.
📰

I built a zero-dependency API router for AWS Lambda, with a Rust core. Here's what the benchmarks say.

DEV Community: serverless·Chandru Vinayagam·about 18 hours ago
#e2F2pjMD
#devtoserverless#devto#dev#lambroute#lambda
Long article (1536 words) — no AI summary yet.
Reading 0:00
15s threshold

TL;DR: lambroute gives Python Lambda functions FastAPI-style routes, validation and Swagger docs, and in my benchmark of a basic API it cold-starts about 2× faster than Powertools and 6× faster than FastAPI + Mangum (1.8× and 2.3× once Pydantic validation is added). Code and benchmark: github.com/HAPPY-CHANDRU-RAJU/lambroute

Every Python API I put on AWS Lambda ended up with the same trade-off. Either I hand-wrote routing and validation inside one big handler, or I pulled in a full web framework and paid for it on every cold start. I wanted the developer experience of FastAPI with the footprint of a plain handler, so I built lambroute .

Why I built it

As a FastAPI developer, I was used to a framework that provides a clean, structured, and developer-friendly way to build APIs, with built-in routing, method-based handlers, request validation, and automatic Swagger documentation.

But whenever I worked with AWS Lambda, I found myself writing much of this functionality manually.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.