serverless-python-requirements | ⚡️🐍📦 Serverless plugin to bundle Python packages | Serverless library
kandi X-RAY | serverless-python-requirements Summary
kandi X-RAY | serverless-python-requirements Summary
A Serverless v1.x plugin to automatically bundle dependencies from requirements.txt and make them available in your PYTHONPATH.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of serverless-python-requirements
serverless-python-requirements Key Features
serverless-python-requirements Examples and Code Snippets
Community Discussions
Trending Discussions on serverless-python-requirements
QUESTION
I have created a simple Flask app and successfully deployed it to AWS Lambda. I am following the first steps of this tutorial.
When the Lambda is run, the following error appears in the log:
...ANSWER
Answered 2021-May-16 at 07:45Flask, Werkzeug and other pallets projects just had a major update, dropping python2 support and deleting _compat
module. And AWS has't resolve the capability issue yet.
The simplest fix will be downgrading Flask, Werkzeug, etc. to the previous major version.
QUESTION
I have the following steps configured in our bitbucket pipeline:
...ANSWER
Answered 2021-Apr-13 at 16:43The answer was pretty mundane. Serverless 2.32+ introduced some change that broke the pipeline. Reverting to version 2.31.0 resolved the issue.
QUESTION
I am trying to deploy a Plotly Dash app as an AWS Lambda using Serverless framework. The app works as expected locally and I can start it using serverless wsgi serve
command. serverless deploy
reports success. However when invoked, lambda fails with the following error:
ANSWER
Answered 2021-Apr-05 at 14:20The reason for ModuleNotFoundError: No module named '_brotli'
is improper dependencies packaging. It is fixed by packaging the app via the use of Docker and the docker-lambda image. slim: true
and strip: false
minimise the package size while preserving binaries wich is required in some cases (in this example it does).
QUESTION
I am trying to trigger a Lambda function after uploading a file.
Below I have defined the file
Lambda function. Within it, a file is uploaded to s3. I then want the process
Lambda function to triger. However, I cannot get it to trigger. Also, in AWS s3, the bucket Properties > Event notifications is empty.
My serverless.yml:
...ANSWER
Answered 2021-Mar-27 at 14:22It appears as though you may have a small typo.
Replacing events
with event
in the handler.process
block seems to work for me:
QUESTION
I'm using Serverless v2.23.0 to deploy a bunch of endpoints to AWS Lambda functions. The Lambda functions run python 3.8. I want to automatically install a dependency upon deploy to AWS Lambda.
For example, I want the package pycurl
installed automatically. I am following the tutorial at https://www.serverless.com/blog/serverless-python-packaging
I added a requirements.txt
file which just has the line:
ANSWER
Answered 2021-Mar-09 at 13:46The libcurl-devel
& openssl-devel
packages are missing, use one of the lambci/lambda Docker images to build and make sure all the dependencies are installed.
Change your serverless.yml
to:
QUESTION
when using the following settings in serverless.yml
...ANSWER
Answered 2021-Feb-04 at 10:08It didn't work for me either. I ended up using Layers using the following option -
QUESTION
I have a Lambda function in python3.6 that uses the following packages:
...ANSWER
Answered 2020-Jun-24 at 21:14I couldn't fix this with serverless. So I decided to sls deploy
without pymongo
and once serverless generated the .requirements.zip
file, I copied that file elsewhere and once again ran sls deploy
but this time with only pymongo
(and pymongo[srv]
) in requirements.txt
. That generated .requirements.zip
containing pymongo and its dependencies. I merged files from this .requirments.zip
and the one requirements.zip
generated from the first sls deploy
. This way I got all other dependencies (opencv2, numpy, joblib etc) and pymongo in one .requirements.zip
file.
After that I zipped the source code plus the merged .requirements.zip
file and manually uploaded the zip to s3. It came down to 128MB zipped. Pointed my lambda function to use this deployment package from S3 and it worked. I got pymongo along with opencv2 and other dependencies.
But, a drawback is that you have to upload to S3 and update the function yourself. Until this is problem is fixed, I am going to have to use this "hack".
QUESTION
Testing, learning serverless framework. I'm trying to deploy simple/basic state machine with two simple lambda functions. Serverless definition as follows:
...ANSWER
Answered 2020-Dec-10 at 13:37Looks like you are referencing something called CustomIamRole in your state machine creation but I cannot see it being created anywhere in the yaml file. Either create the role and use it in creation or remove the depends on part.
QUESTION
Currently learning serverless and state machines. When I'm trying to do deployment I'm getting error: TypeError: Cannot read property ‘startsWith’ of undefined
.
Below you can find serverless.yml definition which I'm trying to deploy. I can't spot the error I did.
State machine I want is really basic and simple. I want to start it with decision, which will direct to correct lambda, depends on input (all of this manual, semi-manual for now). After lambda completion (no matter which one) will be end.
...ANSWER
Answered 2020-Dec-02 at 18:06Line 77 in my serverless.yml has typo... should be Resource
.
QUESTION
Here is my workflow: deploy.yml
...ANSWER
Answered 2020-Nov-13 at 21:40There is possibly an error with your docker container and not the yml file. Or a disconnect in the Dockerfile with your yml.
Dockerfile should have something like
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install serverless-python-requirements
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