Skip to content

Instantly share code, notes, and snippets.

diriver63 / pyodbc-unixODBC-lambda-layer
Last active January 24, 2024 09:32
pyodbc and unixODBC for MSSQL as a lambda layer
View pyodbc-unixODBC-lambda-layer
# use to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
curl -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt