Reputation: 402
AWS lambda is able to find my function in handler settings and certain libraries I have installed in the root folder, but is unable to find other libraries like pyodbc and google.cloud.storage.
Error: START RequestId: 607f59cb-44a9-11e7-82c2-813a7578fcd0 Version: $LATEST Unable to import module 'push_to_s3': No module named pyodbc
Upvotes: 1
Views: 1636
Reputation: 1949
You might need to pre-compile the pyodbc lib using the specific AMI Lambda uses (AMI name: amzn-ami-hvm-2016.03.3.x86_64-gp2).
Here the install instructions on Linux:
Here are more details about native libraries on Lambda env.:
http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
Here some other things you might consider while creating your deployment packages:
http://joarleymoraes.com/hassle-free-python-lambda-deployment/
Upvotes: 1