Deploying python flask app on aws lambda container

0

I want to deploy python flask app on aws lambda using lambda container. I tried using sam. It didn't work. It was expecting a lambda handler function. Is there a way of writing lambda handler to translate it to flask format?

2 個答案
1

Give https://github.com/zappa/Zappa a go, or google "flask lambda" for other options. We had good results with zappa & django with a fairly large app where zappa was used to package it, then it was deployed as a container lambda. It supports zip lambda deployment directly but we found the container option worked better for a larger app.

專家
已回答 2 年前
  • Thank you. My code is exceeding the size. I need container support.

1

You can try Lambda Adapter (https://github.com/awslabs/aws-lambda-web-adapter). The idea is to wrap your web app with a layer that will convert Lambda events into emualated http requests, so you can use any web framework.

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南