title: No module named 'psycopg2._psycopg': ModuleNotFoundError in AWS Lambda
body: <p>I have created a deployment package for AWS Lambda with my python file and the dependencies including sqlalchemy and psycopg2. The code works perfectly in accessing the DB locally. But when I imported this zip file, I am getting the following error. </p>
  
  <pre><code>No module named 'psycopg2._psycopg': ModuleNotFoundError
  </code></pre>
  
  <p>The stack trace of the error is, </p>
  
  <pre><code>{
    "errorMessage": "No module named 'psycopg2._psycopg'",
    "errorType": "ModuleNotFoundError",
    "stackTrace": [
      [
        "/var/task/DBAccessLamdaHandler.py",
        50,
        "lambda_handler",
        "engine = create_engine(rds_host)"
      ],
      [
        "/var/task/sqlalchemy/engine/__init__.py",
        387,
        "create_engine",
        "return strategy.create(*args, **kwargs)"
      ],
      [
        "/var/task/sqlalchemy/engine/strategies.py",
        80,
        "create",
        "dbapi = dialect_cls.dbapi(**dbapi_args)"
      ],
      [
        "/var/task/sqlalchemy/dialects/postgresql/psycopg2.py",
        554,
        "dbapi",
        "import psycopg2"
      ],
      [
        "/var/task/psycopg2/__init__.py",
        50,
        "&lt;module&gt;",
        "from psycopg2._psycopg import (                     # noqa"
      ]
    ]
  }
  </code></pre>
  
  <p>Any help is appreciable</p>