Deploy a standard FastAPI app to AWS Lambda serverlessly in two commands. No Docker. No handler code. No code changes.

How do I deploy FastAPI to AWS Lambda without code changes?

You add Lambda Web Adapter as a Lambda Layer, and your FastAPI app deploys to AWS Lambda with sam build && sam deploy. The same code you run locally with uvicorn goes straight to production without any modifications. No handler wrapper, no Mangum, no Dockerfile.

Lambda scales to zero, so you pay nothing when idle, and your app never knows it's running on Lambda. In this post, I walk through how to set this up from scratch, explain the architecture, and deploy a working API in about 60 seconds of actual commands.

What is Lambda Web Adapter and how does it work with FastAPI?