AWS Lambda is showing me 'no module import error' for package pyodbc in my lambda function. I've been using another library without error like this only getting error for this 'pyodbc' lib. I've added pyodbc installing with pip to my python code directory and upload them in zip to aws lambda.
2
votes
Please provide more information about how you created your zip file. I assume you saw the official documentation?
– FamousJameous
yea i have downloaded pyodbc library with pip install -t. pyodbc to current lambda function directory and made zip of then and uploaded to aws lambda.
– Dheeraj Suthar
i think that the pyodbc need to be installed in linux environment using pip then i would work !!
– Dheeraj Suthar
1 Answers
0
votes
You would need to ensure that the native libraries that pyodbc requires are present in the Lambda execution environment - either bundled as part of your deployment package or as a separate Lambda layer.
See https://medium.com/@narayan.anurag/breaking-the-ice-between-aws-lambda-pyodbc-6f53d5e2bd26 for more details about this.