-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Project and Site-Packages from S3 #510
Comments
You probably want to check the file hash somehow (s3 etag) in case you push an update to s3 and need to pull down over an already unzipped project in a warm handler. Not sure if that's really an issue depending on how long your stuff lives but it might be a while with the keep warm setting. It should be pretty obvious when the application is actually having to download and unzip in the timings, so it will be easy to keep an eye on. |
Thanks @machbio for wanting to help (as per Slack convo). Here is my fork for getting going. https://github.com/mcrowson/Zappa/tree/project-to-s3 There are a few things I'm working through now.
|
A cool side effect of keeping your project in a bucket is you could move all the lambda management stuff over to cloud formation, too. Not sure if that's worth pursuing at the moment but it's def an option to simplify some of the update stuff. |
Sorry about doubting '/tmp' space guarantee - its pretty clear that '/tmp' space is 512MB as given in the Limit - http://docs.aws.amazon.com/lambda/latest/dg/limits.html#limits-list
and also on the FAQ page for Lambda - https://aws.amazon.com/lambda/faqs/
|
Currently, the entire application and site packages are uploaded to Lambda. This issue proposes uploading the project contents and deps to S3 instead, and having the zappa handler load the project files.
Proposed Changes:
The first time the application runs it will likely be slower pulling from S3, but if the application uses the keep_warm appropriately, then the subsequent loads shouldn't have the same slowdown due to lambda keeping /tmp around between function calls.
The benefit of this change would be allowing much larger applications to run on Lambda.
Thoughts? Am I missing something?
Credits to @mathom for suggesting P3 via S3 this way.
The text was updated successfully, but these errors were encountered: