1

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?

1
  • What is your functions handler method? Commented Jun 30, 2019 at 13:42

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

Try to import cython along with pymssql.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.