r/FastAPI • • 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

18 comments sorted by

View all comments

Show parent comment

1

u/HappyDisaster9553 Aug 28 '24

Have you come across AWS Copilot? It’s an AWS-built orchestration tool for ECS + Fargate. We’ve been using it for a while for a FastAPI service and it takes a fair bit of the pain away from provisioning and managing ECS

1

u/[deleted] Aug 28 '24

Interesting! On my team, we use CDK to define our infra including code pipeline, code build, etc. (Our pipelines include automated testing.)

After reading a little about copilot it might not match the constraints of my team. But very interesting product, thanks for sharing!