My OS is win 10 Home. I have a Python 3.6 script that updates an MSSql DB, using pymssql. The script works fine locally. Now I need to upload it as aws lambda, so I followed this using the cmd:
python -m venv .
Scripts\activate
pip install pymssql
Then I copied my py function to the Lib\site-packages dir, ziped all the dir content and uploaded it to the Lambda service.
The result was this error:
Unable to import module 'validationLambda': No module named 'pymssql'
How to fix this?
-
What is your functions handler method?jmp– jmp2019年06月30日 13:42:29 +00:00Commented Jun 30, 2019 at 13:42
2 Answers 2
I am not strong with Windows environments but you should probably try to do the opposite.
Copy the Lib\site-packages\pymssql directory to the root of your package (same level with your_function.py
Comments
Try to import cython along with pymssql.