title: create_engine in sqlalchemy not working in python 3.6 runtime for aws lambda
body: <p>I successfully tested pandas, numpy, and sqlalchemy in an Amazon Linux docker image using python 3.6. I was able to import, use, and connect to a database in the virtual environment using <code>create_engine</code> from the <code>sqlalchemy</code> module in python 3.6. </p>
  
  <p>I then exported all the dependencies and built a python deployment package to run it in AWS Lambda but for some reason I keep getting an error for <code>create_engine</code> in lambda.</p>
  
  <blockquote>
    <p>module 'sqlalchemy' has no attribute 'create_engine': AttributeError</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import sqlalchemy
  from datetime import datetime, timedelta
  
  def lambda_handler(event, context):
  
      engine = sqlalchemy.create_engine("DB_URI")
  
      return "Hello world!"
  </code></pre>
  
  <p>However, if I simply comment out the line where I call <code>create_engine</code>, I get my "Hello world!" response.</p>
  
  <p>I don't get why <code>create_engine</code> is not working in this environment when it worked perfectly fine in the identical docker environment. Any ideas?</p>