Promisify an AWS lambda function
$ npm install --save aws-lambda-pify
const pify = require('aws-lambda-pify');
const index = require('./');
const fn = pify(index.handler);
fn({foo: 'bar'}).then(() => {
//=> success
});
Returns a promise wrapped version of the supplied Lambda function.
Type: function
The AWS Lambda function.
Type: object
aws-lambda-mock-context options object
- aws-lambda-mock-context - Mock context object.
MIT © Sam Verschueren