0
I recently added some dependencies to my serverless project and ran into the following error when invoking my newly deployed Lambda.
module initialization error: Cannot load native module 'Cryptodome.Hash._MD5': Trying '_MD5.cpython-36m-x86_64-linux-gnu.so': /var/task/vendored/Cryptodome/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/vendored/Cryptodome/Util/../Hash/_MD5.abi3.so: cannot open shared object file: No such file or directory, Trying '_MD5.so': /var/task/vendored/Cryptodome/Util/../Hash/_MD5.so: cannot open shared object file: No such file or directory
This dependency stems from one of my other dependencies and I don't want to manually modify these dependencies to use a different package. I would also prefer to not set up a virtual Linux environment to package this project.
What can I do to better investigate this issue, and ideally, resolve it?
I don't encounter this issue on my local dev instance running MacOS 10.13.6 and Python 3.6.0.
I did some research on this problem and here's what I've gathered: