I have built deployment package to connect to a AWS RDS instance via pyodbc, after zipping up and uploading to AWS lambda this connection works.
When trying to connect via an AWS layer, following error is displayed.
"errorMessage": "('01000', \"[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found (0) (SQLDriverConnect)\")",
"errorType": "Error",
Tried to change the path for the driver in the odbcinst.ini file, but with no luck
Example of text in odbcinst.ini file
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/var/task/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
UsageCount=1