Deploying python flask app on aws lambda container


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 Answers

Give 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.

answered 5 months ago
  • Thank you. My code is exceeding the size. I need container support.


You can try Lambda 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.

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions