1回答
- 新しい順
- 投票が多い順
- コメントが多い順
1
Hi,
the issue could be due to many reasons:
- Make sure you build/install the numpy library in the lambda by specifying the platform to be linux
- Create a Layer (https://repost.aws/knowledge-center/lambda-python-function-layer) or use an existing one containing numpy
- Als, you may consider to deploy the Lambda as container instead of zip
Hope it helps ;)
関連するコンテンツ
- AWS公式更新しました 3年前
How can I create a layer to invoke my lambda function. Means where I have to write --- pass a list of dependencies included with the layer metadata.
{ "dependencies": { "requests": "latest", "numpy": "== 1.20.1", "keyring": ">= 4.1.1" }, "layer": { "name": "a-sample-python-lambda-layer", "description": "this layer contains requests, numpy and keyring libraries", "compatible-runtimes": ["python3.6","python3.7","python3.8"], "license-info": "MIT" } }
You can create a layer to invoke your Lambda function and pass a list of dependencies included with the layer metadata.
The following example creates Python Lambda layers containing requests (latest version), numpy (version 1.20.1), and keyring (version >= 4.1.1) libraries. You can invoke the Lambda function with a payload similar to the following:
AND What does this defines The Python version is: Python3.9 from "/var/lang/bin/python3.9"