transcend-io / yarn_v2_lambda_example

An example of a Yarn v2 workspaces setup for using PnP dependencies inside a lambda function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

An example of a Yarn v2 workspaces setup for using PnP dependencies inside a lambda function


Languages

Language:TypeScript 63.6%Language:JavaScript 36.4%