Yarn v2 Lambda Example
To create the lambda layer:
yarn workspace yarn-plugin-lambda-layer register
yarn lambda layer
To bundle lambda code via webpack:
yarn workspace sample-lambda run webpack --config webpack.js
To deploy the lambda via serverless:
yarn workspace sample-lambda run serverless deploy
To check on logs after invoking the function via curl <endpoint>
:
yarn workspace sample-lambda run serverless logs -f basicHttpHandler
Esbuild example
To build the esbuild example, run:
yarn workspace sample-lambda-esbuild node build.js
And to deploy run:
yarn workspace sample-lambda-esbuild run serverless deploy