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:
- Click "Create Layer" button:
- Give a name for your layer, upload the zip and select the runtime