1.0.24 • Published 4 years ago
local-lambda-invoke v1.0.24
local-lambda-invoke
Support a lambda calling another lambda for local use only.
usage
const Lambda = require('aws-sdk/clients/lambda')
const localLambdaInvoke = require('local-lambda-invoke')(Lambda)
Lambda[Symbol.for('localHandlers')] = {
async 'test-lambda' (event, context) { return 'okidoki' }
}
const params = {
FunctionName: 'test-lambda',
Payload: JSON.stringify({ testing: true }),
InvocationType: 'Event',
LogType: 'None',
Qualifier: '$LATEST'
}
const lambda = new Lambda()
lambda.invoke(params).promise().then(console.log, console.error)