title: Import Python module into AWS Lambda
body: <p>I have followed all the steps in the documentation:
  <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html</a> </p>
  
  <ol>
  <li><p>create a directory. </p></li>
  <li><p>Save all of your Python source files (the .py files) at the root level of this directory.</p></li>
  <li><p>Install any libraries using pip at the root level of the directory.</p></li>
  <li><p>Zip the content of the project-dir directory)</p></li>
  </ol>
  
  <p>But after I uploaded the zip-file to <strong>lambda</strong> function, I got the error message when I test the script</p>
  
  <p>my code:</p>
  
  <pre><code>    import psycopg2
      #my code...
  </code></pre>
  
  <p>the error:</p>
  
  <pre><code>    Unable to import module 'myfilemane': No module named 'psycopg2._psycopg'
  </code></pre>
  
  <p>I don't know where is the suffix <code>'_psycopg'</code> from...</p>
  
  <p>Any help regarding this?</p>