2 Answers
- Newest
- Most votes
- Most comments
0
Hello.
"arn:aws:lambda:ap-northeast-1:770693421928:layer:Klayers-p39-requests:19" is compatible with Python3.9, so I think it may not work depending on the Python version.
So, why not try creating your own layer using the steps in the document below?
https://docs.aws.amazon.com/lambda/latest/dg/python-layers.html
0
To resolve the error "Unable to import module 'lambda_function': No module named 'requests'" in AWS Lambda, you can use a Lambda layer to include the necessary Python packages. Note that Lambda only supports Linux system Python packages.
- First, you have to install the python packages on any Linux machine either local or use AWS EC2 instance.
- Then zip the python package.
- Finally, upload the zip file into lambda layer and add the layer into lambda function.
answered a year ago
Relevant content
- AWS OFFICIALUpdated 24 days ago
- AWS OFFICIALUpdated a year ago