'Python - AWS Lambda Function - Could not satisfied requirement
I am just starting using AWS Lambda functions, and I come across this situation. I have the most basic python lambda function ( the Hello-World example ) generated from using sam init and when I use sam build I am receiving this error message :
' Build Failed Error: PythonPipBuilder:ResolveDependencies - Could not satisfy the requirement: requests '
The requirements.txt file contains only : requests and the tutorial used is here :
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html
Please, help me with this situation.
Thank you!
Solution 1:[1]
I finally managed to solve it using the steps from this great tutorial : https://www.geeksforgeeks.org/how-to-install-python-packages-for-aws-lambda-layers/
Right now, in AWS you have access to Python3.9, so you would have to install it in the docker image + the appropriate bitarray module
Python3.9 installation: Will's answer from : How to install python3.9 on linux ubuntu terminal?
This step also :
pip install --upgrade setuptools from : Pip error: Microsoft Visual C++ 14.0 is required
PS: python -c 'import bitarray; bitarray.test()' -> to test if the module is working
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Henry Ecker |
