I am trying to deploy an AWS Lambda package. The language is Python 3.6, and it includes external modules (flask-ask
and thereby indirectly cryptography
). When I do so, and test the function, AWS reports error:
No module named 'cryptography.hazmat.bindings._openssl'
My development environment is Windows 10. My function works perfectly well on my development environment. I package the function up with Powershell script ...
& $pip install flask-ask -t $projectDir
... and then zip up the result and the function to make the zip package. My development version of Python 3.6 has 64-bit bitness.
Questions
Why does the function work locally, but not when packaged and sent to AWS? What is missing? and how do I fix it.
Similar questions
I've found other people had similar questions here:
- importing cryptography.hazmat.bindings._openssl in Python 3.6 AWS Lambda Error
- When zipping a virtual env for AWS Lambda deployment, what can I leave out?
I am loathe to switch to Python 2.7 . The second one only has solutions for a linux development environment.