Package Exports
- serverless-command-line-event-args
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-command-line-event-args) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Serverless CommandLine Event Args
Overview
This is a Serverless Framework plugin. Event JSON passes a Lambda function in commandline. Support to Serverless 1.0
Usage
Execute your Lambda function. Add -e '<JSON>'
or --event '<JSON>'
.
$ serverless invoke -f YourFunction --event '{"foo":"var"}'
it is displayed {"foo":"var"}
.
module.exports.handler = function(event, context, cb) {
console.log(event);
};
Install
Execute npm install in your Serverless project.
$ npm install serverless-command-line-event-args
add the plugin to your serverless.yml file
plugins:
- serverless-command-line-event-args