title: AWS Lambda Python function: import module error: module not found
body: <p>This has been already asked a number of times, but I have tried everything suggested plus more, and nothing seems to work.</p>
  <p>My setup: an application on Lambda, with python functions and deployed via CloudPipeline. This is the full error I get (and all I can see in the logs):</p>
  <pre><code>   {
    &quot;errorMessage&quot;: &quot;Unable to import module 'lambda_functions.function_one': No module named 'lambda_functions'&quot;,
    &quot;errorType&quot;: &quot;Runtime.ImportModuleError&quot;
  }
  </code></pre>
  <p><code>lambda_functions</code> is a directory, and <code>function_one</code> is the name of the python file with the handler in it. The full function invocation path in my <code>template.yml</code> is: <code>lambda_functions.function_one.lambda_handler</code>. I do have a <code>__init__.py</code> in that dir.</p>
  <p>I installed the AWS SAM tools and I can invoke the function locally fine. I have also downloaded the zipped project from S3 and checked permissions etc.</p>
  <p>The logs show that the requirements are installed correctly, but even then, just to make sure I tried commenting out everything in the function file except for a bare handler, no dependencies at all, and still fails.</p>
  <p>Any ideas on why Lambda can fail to find my module?</p>