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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인