npm.io
3.0.0 • Published 10 years ago

aws-lambda-pify

Licence
MIT
Version
3.0.0
Deps
2
Vulns
0
Weekly
0
Stars
9

aws-lambda-pify Build Status

Promisify an AWS lambda function

Install

$ npm install --save aws-lambda-pify

Usage

const pify = require('aws-lambda-pify');
const index = require('./');

const fn = pify(index.handler);

fn({foo: 'bar'}).then(() => {
    //=> success
});

API

pify(input, [options])

Returns a promise wrapped version of the supplied Lambda function.

input

Type: function

The AWS Lambda function.

options

Type: object

aws-lambda-mock-context options object

License

MIT Sam Verschueren

Keywords