title: AWS-SAM Python Lambda Function telling me it can't import the module for the function
body: <p>Writing an AWS-SAM based application and when I try running the lambda function, I get this error:</p>
  <pre><code>[ERROR] Runtime.ImportModuleError: Unable to import module 's3-logging/upload': No module named 'lambdas'
  </code></pre>
  <p>I've tried a ton of combos of CodeURI and handler, but can't seem to figure it out. My Googling has told me that the lambda container mounts the code <strong>located at CodeURI</strong>. So, in order to reference it, I need to have the handler relative to the directory in CodeURI.</p>
  <p>I'm building/staging/deploying it with the AWS-SAM CLI.</p>
  <p>Template File:</p>
  <pre><code>DataBucketS3LoggingFunction:
      Type: 'AWS::Serverless::Function'
      Properties:
        Handler: s3-logging/upload.lambda_handler
        Runtime: python3.8
        CodeUri: ./lambdas
  </code></pre>
  <p>Directory Structure:</p>
  <p><a href="https://i.stack.imgur.com/61wEK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/61wEK.png" alt="Project Structure" /></a></p>