local-lambda-invoke

1.0.24 • Public • Published

local-lambda-invoke

Support a lambda calling another lambda for local use only.

js-standard-style Greenkeeper badge build status downloads

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)

license

Apache License, Version 2.0

Readme

Keywords

Package Sidebar

Install

npm i local-lambda-invoke

Weekly Downloads

0

Version

1.0.24

License

Apache-2.0

Unpacked Size

3.16 kB

Total Files

3

Last publish

Collaborators

  • jameskyburz