UNPKG

@kumologica/builder

Version:
22 lines (18 loc) 500 B
function trigger(functionName, params){ let templateResources = {}; const id = new Date().valueOf() + Math.floor(Math.random() * 100000000); templateResources["LFEventSourceMapping" + id] = { Type: "AWS::Lambda::EventSourceMapping", DependsOn: 'Lambda', Properties: { BatchSize: params.sqs.batchSize, Enabled: true, EventSourceArn: params.sqs.queueArn, FunctionName: functionName } } return templateResources; } module.exports = { trigger }