lambda-cb-to-promise
v0.0.1
Published
promises support to lambda aws
Downloads
3
Readme
lambda-cb-to-promise
support to promises in aws lambda
Usage
const promiseHandler = require('lambda-cb-to-promise')
const awsHanlder = (eventFromAws, ctxFromAws, cbToCheckIfPromiseIsReturned) => {
// lambda function is here
// you can return a promise
return Promise.resolve({})
// or you can call the callback
cbToCheckIfPromiseIsReturned('error', null)
}
const handlerToAwsLambda = promiseHandler(awsHanlder)