Tracked
- NPM Downloads Last Month
- 9
- Issues
- 0
- Stars
- 0
- Forks
- 0
- Watchers
- 0
Serverless plugin to run your functions in nodejs version (8 LTS, 9+) on aws lambda
serverless-webpack
plugin$ npm install serverless-plugin-node-shim --save-dev
Add the plugin to your serverless.yml
file:
plugins:
- serverless-plugin-node-shim
Download and extract a x64 linux binary from https://nodejs.org/en/download/ into your project root
$ curl 'https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz' | tar xf -
Let the plugin know the path to your nodejs binary (relative to project root)
custom:
nodeShim:
execPath: node-v8.9.4-linux-x64/bin/node
git clone https://github.com/jzimmek/serverless-plugin-node-shim
cd serverless-plugin-node-shim
npm install
cd examples/node-v8-lts
npm install
npm run deploy
npm run invoke
git clone https://github.com/jzimmek/serverless-plugin-node-shim
cd serverless-plugin-node-shim
npm install
cd examples/node-v9
npm install
npm run deploy
npm run invoke
git clone https://github.com/jzimmek/serverless-plugin-node-shim
cd serverless-plugin-node-shim
npm install
cd examples/with-webpack
npm install
npm run deploy
npm run invoke
This plugin is heavily inspired by the way apex is implemented. Reading the source code of serverless-coffeescript was very helpful.