title: Include ODBC Library in AWS Lambda Python Deployment
body: <p>I have created a Deployment Package for AWS Lambda, written in Python 2.7. In the Python script, I use pypyodbc to connect to an external data source, using a User DNS that I have configured on my local machine. When I attempt to deploy the package, I get the following error:</p>
  
  <pre><code>module initialization error: 'ODBC Library is not found. Is LD_LIBRARY_PATH set?'
  </code></pre>
  
  <p>I created the package <code>project-dir</code> using pip into a virtual environment. The package is arranged as follows:</p>
  
  <pre><code>/project-dir
    __init__.py
    PythonFileIWantToUse.py
    pypyodbc.py
    pypyodbc.pyc
    /boto
    /pypyodbc-1.3.3.dist-info
    /other modules, etc.
  </code></pre>
  
  <p>I've tried adding</p>
  
  <p><code>#Point Lambda to Required OBDC Directory
  os.environ['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH'] + ':' + '/var/task/'</code></p>
  
  <p>to <code>MainPythonIWantToUse.py</code> above the lambda_handler function, and including odbc32.lib in the root directory, but I got the same error.</p>
  
  <p>Any idea what I need to do? I configured a local ODBC in Windows, but I'm not sure what file(s) to put where for Lambda's Unix Environment to find them.</p>
  
  <p>Edit: I've tried to include the elements of UnixODBC in the root directory as well, but this doesn't change the result.</p>