Invoke bragg routes in a lambda function.
$ npm install --save bragg-route-invoke
const invoke = require('bragg-route-invoke');
invoke.get('myFunction', '/foo/{bar}', {params: {bar: 'bar'}}).then(result => {
// handle result
});
invoke.post('myFunction', '/foo', {body: {foo: 'bar'}}).then(() => {
// resource created
});
invoke.postAsync('myFunction', '/foo', {body: {foo: 'bar'}}).then(() => {
// don't wait for the target function to be executed
});
Type: string
Lambda function name that should be invoked.
Type: string
Resource path of the function defined by the router.
Type: object
Body of the request.
Type: object
Params of the request.
Type: object
Query string of the request.
Type: object
Identity of the request.
- aws-lambda-invoke - API for this module.
MIT © Sam Verschueren