Skip to content

Cereceres/lambda-cb-to-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

API promiseHandler(awsHandler) -> handlerWithPromiseSupport

About

support to promises in aws lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published