seneca-aws-lambda
This plugin invokes AWS Lambda functions.
Install
Install via npm. You will need install Seneca.js also.
npm install seneca-aws-lambda
Setup
var AWS = ;AWSconfig; var seneca = ;seneca;
options
- instance: (string, default 'new AWS.Lambda()') an instance of AWS Lambda you want to use
var AWS = var seneca = ; // Use a shared key stringseneca;
AWS Configuration
Refer to the AWS SDK for authenticating to AWS prior to using this plugin.
Provided actions
seneca-aws-lambda
provide the following actions. (all including the {role: "aws-lambda"}
)
invoke - run a lambda function
- arguments:
functionName
all other arguments are passed to the lambda function - result: result of the lambda function
seneca;
You even just invoke a lambda function and not wait for the response. However, this still requires your lambda function to still call context.done()
so seneca does not time out.
Lambda Function
exports { context; // Call done immediately to alert seneca // Do some heavy lifting};
Invoke with No Callback
seneca;
Test
npm test
License
MIT © Blain Smith