title: Import libraries in lambda layers
body: <p>I wanted to import <code>jsonschema</code> library in my AWS Lambda in order to perform request validation. Instead of bundling the dependency with my app , I am looking to do this via Lambda Layers. I zipped all the dependencies under <code>venv/lib/python3.6/site-packages/</code>. I uploaded this as a lambda layer and added it to my aws lambda using <code>publish-layer-version</code> and <code>aws lambda update-function-configuration</code> commands respectively. The zip folder is name &quot;lambda-dep.zip&quot; and all the files are under it. However when I try to import jsonschema in my lambda_function , I see the error below -</p>
  <pre><code>from jsonschema import validate
  </code></pre>
  <pre><code>{
    &quot;errorMessage&quot;: &quot;Unable to import module 'lambda_api': No module named 'jsonschema'&quot;,
    &quot;errorType&quot;: &quot;Runtime.ImportModuleError&quot;
  }
  </code></pre>
  <p>Am I missing any steps are is there a different mechanism to import anything within lambda layers?</p>