lambda-uploader | Helps package and upload Python lambda functions to AWS | Cloud Functions library
kandi X-RAY | lambda-uploader Summary
kandi X-RAY | lambda-uploader Summary
Helps package and upload Python lambda functions to AWS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Execute the function
- Cleanup temporary workspace
- Set s3 bucket
- Set alias
- Build a package
- Setup temporary workspace
- Build the project
- Install the virtualenv
- Get raw configuration
- Loads the lambda configuration
- Create subscription subscriptions
- Subscribe to the Kinesis stream
- Validate kinesis subscription
- Check that the key value is of cls
- Copy source files recursively
- Return True if file should be ignored
- Validate VPC config array
- Validate a configuration value
- Return package meta data
lambda-uploader Key Features
lambda-uploader Examples and Code Snippets
Community Discussions
Trending Discussions on lambda-uploader
QUESTION
Background
I have been struggling for the past few days to deploy a Lambda that uses Pillow, and I am deploying using Python 3.6. It may be noteworthy also that I am developing this on a Windows 10 environment.
First Attempts
I began by having pip install my packages strictly in my workspace by doing the following:
...ANSWER
Answered 2018-May-08 at 20:15Basically, you have to compile the libraries (eg, PIL) either using Docker or, even better, an EC2 instance.
Launch an Docker container like this:
docker run --rm -it -v "%cd%:/code" lambci/lambda:build-python3.6 sh
Inside there, navigate to the /code dir (
cd /code
), create a virtualenv (virtualenv env
), activate it (source env/bin/activate
) and finally, install your library (pip install pillow
).Once you have installed your library, you can exit the container. The secret here is to move your package library to the root folder (where your main .py file is). For example, move the folder
env/lib/python3.6/site-packages/PIL
to the root.
Then, zip your PIL folder together with your .py file and you're set!
I just did it and documented it in full here: https://learn-serverless.org/post/deploying-pillow-aws-lambda/
QUESTION
Afternoon,
I recently came across AWS Lambda and Azure Functions. AWS imposes a limit on the size of zipped as well as unzipped files, which for python scripts need to include all of the dependent modules. I have been using lambda-uploader to package my script and it's module dependencies, but the pandas package is too big.
I have seen examples of people completing machine learning and using pandas on AWS Lambda (a little outdated though) but I can't see how they're doing it. Any suggestions?
...ANSWER
Answered 2018-Mar-30 at 03:05The package that you upload to lambda should not contain anything but the code and support modules required for Lambda to run your code. The Lambda console UI limits the file size to 10MB but you can upload zip files up to 50MB if you place them in an S3 bucket and then request that Lambda load them from S3.
Any other assets that you require for execution such as machine learning models should be uploaded separately to S3 and then downloaded from within your Lambda function at execution time. The Lambda function can write to a /tmp
folder but keep in mind it only has access to 512MB of disk space. Also keep in mind that the Lambda function has a maximum runtime of 300 seconds so downloading really large files will take time away from your function doing real work with the data you're downloading.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lambda-uploader
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page