Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jameskyburz/local-lambda-invoke
https://github.com/jameskyburz/local-lambda-invoke
aws aws-lambda aws-lambda-invoke development node
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jameskyburz/local-lambda-invoke
- Owner: JamesKyburz
- Created: 2019-02-25T08:02:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-23T08:05:46.000Z (over 4 years ago)
- Last Synced: 2025-02-08T13:13:00.853Z (7 days ago)
- Topics: aws, aws-lambda, aws-lambda-invoke, development, node
- Language: JavaScript
- Size: 1.85 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# local-lambda-invoke
Support a lambda calling another lambda for local use only.
[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/feross/standard)
[![Greenkeeper badge](https://badges.greenkeeper.io/JamesKyburz/local-lambda-invoke.svg)](https://greenkeeper.io/)
[![build status](https://api.travis-ci.org/JamesKyburz/local-lambda-invoke.svg)](https://travis-ci.org/JamesKyburz/local-lambda-invoke)
[![downloads](https://img.shields.io/npm/dm/local-lambda-invoke.svg)](https://npmjs.org/package/local-lambda-invoke)### usage
```javascript
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](LICENSE)