Open shivgit87 opened 6 years ago
Hmm, seems like a packaging issue that's affecting the Crypto package (we use pycryptodome). Are other binary dependencies working?
I'm not familiar with Lambda's packaging requirements, but you may want to post in the appropriate support forums or on StackOverflow.
Came across this same issue. You need to install the runtime on linux system as cryptodome is os specific and lambda runs with linux backend source - https://github.com/Legrandin/pycryptodome/issues/69
Steps I followed
pyasn1==0.3.5 pyasn1_modules==0.0.8 javaobj-py3==0.2.1 pycryptodomex==3.10.1
python3.8 -m pip install -r ./requirements.txt -t renew_certificate/ --no-dependencies
python3.8 -m pip install -r requirements2.txt -t python --no-dependencies
I have built JKS package and trying to execute the code in Lambda by uploading as a zip. While trying to test the code I am getting following error :-1:
START RequestId: d210481c-b1d6-11e8-96b2-dbaf32b85648 Version: $LATEST module initialization error: Cannot load native module 'Crypto.Hash._MD5': Trying '_MD5.cpython-36m-x86_64-linux-gnu.so': /var/task/Crypto/Util/../Hash/_MD5.cpython-36m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory, Trying '_MD5.abi3.so': /var/task/Crypto/Util/../Hash/_MD5.abi3.so: cannot open shared object file: No such file or directory, Trying '_MD5.so': /var/task/Crypto/Util/../Hash/_MD5.so: cannot open shared object file: No such file or directory
END RequestId: d210481c-b1d6-11e8-96b2-dbaf32b85648 REPORT RequestId: d210481c-b1d6-11e8-96b2-dbaf32b85648 Duration: 516.12 ms Billed Duration: 600 ms Memory Size: 128 MB Max Memory Used: 29 MB
module initialization error Cannot load native module 'Crypto.Hash._MD5': Trying '_MD5.cpython-36m-x86_64-linux-gnu.so': /var/task/Crypto/Util/../Hash/_MD5.cpython-36m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory, Trying '_MD5.abi3.so': /var/task/Crypto/Util/../Hash/_MD5.abi3.so: cannot open shared object file: No such file or directory, Trying '_MD5.so': /var/task/Crypto/Util/../Hash/_MD5.so: cannot open shared object file: No such file or directory
It says Cannot load native module.