0
votes

I'm trying to invoke aws lambda from another aws lambda using boto3 in python

in order to construct the first lambda I used serverless framework with custom: zip:true

when I invoke I get the massage:

{'errorMessage': "Unable to import module 'handler': No module named 'joblib'", 'errorType': 'Runtime.ImportModuleError'}

how can I unzip the first lambda requirements?

Thanks for your help

1
The deployment package (aka the zip file) is automatically unzipped by AWS Lambda platform. It seems more a configuration error. Is the module at the root of the deployment package? Is handler correctly configured? - BAD_SEED
Hi BAD_SEED thank you for your help, I think the problem is because I have another ZIP file inside the s3 bucket I try to unzip it using: try: import unzip_requirements except ImportError: pass - nis

1 Answers

0
votes

By default, Serverless creates a bucket with a generated name like <service name>-serverlessdeploymentbuck-1x6jug5lzfnl7 to store your service's stack state.

Please go to S3 and find you deployment bucket. There you could download your latest lambda archive and unzip it, this is how could see if you really have all required modules uploaded.

Here is how to add extra dependencies not included by AWS.

https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-dependencies