Skip to main content

Set up Lambda layer

1. Create Lambda layer with required libraries

mkdir lambda && cd lambda

npm i -s supertokens-node @middy/core @middy/http-cors
mkdir nodejs && cp -r node_modules nodejs
zip -r supertokens-node.zip nodejs/

2. Upload SuperTokens lambda layer

  • Open AWS Lambda dashboard and click on layers:
AWS Lambda sidebar UI
  • Click "Create Layer" button:
Create layer button UI
  • Give a name for your layer, upload the zip and select the runtime
Lambda layer node configuration UI