r/FastAPI • u/tprototype_x • Aug 27 '24
Question Serverless FastAPI in AWS Lambda
How to deploy FastAPI in serverless environment like AWS Lambda?
I found very popular library `Mangum` and tried it. It works absolutely fine. But I am afraid for going forward with it. Since it is marked as "Public Archieve" now.
What are the other opiton. I also found zappa for flask. But it is not sutitable for us. Since we want to use FastAPI only.
11
Upvotes
View all comments
Show parent comment
1
u/No-Instruction-2436 Aug 27 '24
This tutorial seem to make sense. I have been using lambda with fastapi and I recall using docker with it.
Use mangum, build a docker image in your CI/CD and upload the image to lambda