my application executes some http request and inserts the result into db sql server on a daily basis. The sql server is on the amazon rds service, I use the default settings-vpc.
When I try to use it in aws lambda (packaged as defined in the aws-lambda documentation), it gives the following error:
Module initialization error: 'ODBC library not found. Is LD_LIBRARY_PATH set?'
I am using pypyodbc as the python mssql module.
Do i need to configure odbc library manually?
The attached role includes the policy of:
- AWSLambdaVPCAccessExecutionRole
Edit: I tried using ceodbc and pyodbc, could not find the "module error" error. (installed in virtualenv with ceodbc whl file, pyodbc with pip) NOTE. These two have .pyd file extensions at the root level, as they are also in the site-packages folder. I assume that amazon lambda does not include the pyd file at runtime.
Edit2: performed the following steps, received the same error. https://docs.aws.amazon.com/lambda/latest/dg/vpc-rds-create-rds-mysql.html
source
share