Closed jneves closed 5 months ago
Keep in mind that Lambdas which are created from ECR have very long cold starts: for my project it's 4.5 seconds compared with 1.2 seconds before Looks like we need a feature like "concurrency" for warmups
Related post exploring cold starts with docker images: https://ianwhitestone.work/serverless-ml-deployments/
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.
Originally from: https://github.com/Miserlou/Zappa/issues/2192 by ian-whitestone
Background
As discussed in #2188, AWS recently announced container image support for AWS Lambda. This means you can now package and deploy lambda functions as container images, instead of using zip files. The container image based approach will solve a lot of headaches caused by the zip file approach, particularly with file sizes (container images can be up to 10GB) and the dependency issues we all know & love.
What does this PR do?
zappa update
andzappa deploy
commands accept a newdocker_image_uri
parameter.docker_image_uri
must point to an image in Elastic Container Registry (ECR) that complies with these guidelines. Instructions on how to configure this docker image will be provided in an accompanying blog post.save-python-settings-file
CLI command, which will be used to generate & save thezappa_settings.py
file that must be included in your docker imageReproducible example
See this repo which contains an example
Dockerfile
that can be used for testing.Discussion points for reviewers
zappa update,
zappa deploy,
zappa rollback` commands for both creating from a zip file (traditional method) and from a docker image (new method)save-python-settings-file
command, wait until lambda is ready function, etc.) into separate PRsFuture Work & Next Steps
zappa deploy
, you need to first create your own docker and then deploy.zappa rollback
, see this comment for details