smallorange-lambda-wrapper
v1.0.1
Published
Small set of AWS lambda wrapper
Downloads
11
Readme
Small Orange Lambda Wrapper
Usage
const Lambda = require('smallorange-lambda-wrapper');
const lambda = new Lambda({
auth: {
getToken: (params, headers, context) => string | (default: headers.authorization | params.token)
getSecret: (payload, params, headers, context) => string | string
},
app: {
routes: {
'GET /routeOne': (params, headers, context) => Observable,
'POST /routeOne': (params, headers, context) => Observable
},
remotes: {
'api': object
}
}
});
module.exports = lambda.handler.bind(lambda);