# @koeroesi86/node-lambda-invoke

> A local Lambda implementation

Latest version **1.0.21-d1fa702** (published 2020-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @koeroesi86/node-lambda-invoke
pnpm add @koeroesi86/node-lambda-invoke
yarn add @koeroesi86/node-lambda-invoke
bun add @koeroesi86/node-lambda-invoke
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.21-d1fa702 |
| Published | 2020-10-11 |
| First published | 2019-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 27.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Krisztian Korosi |
| Maintainers | koeroesi86 |

## Links

- npm: https://www.npmjs.com/package/@koeroesi86/node-lambda-invoke
- Repository: https://github.com/Koeroesi86/node-lambda-invoke
- Homepage: https://github.com/Koeroesi86/node-lambda-invoke#readme
- Issues: https://github.com/Koeroesi86/node-lambda-invoke/issues
- npm.io page: https://npm.io/package/@koeroesi86/node-lambda-invoke

## Dependencies (5)

- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [dotenv](https://npm.io/package/dotenv.md) ^6.2.0
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.3
- [nodemon](https://npm.io/package/nodemon.md) ^1.18.10

## Recent versions

- 1.0.21-d1fa702 (latest) — 2020-10-11
- 1.0.20-d1fa702 — 2019-10-12
- 1.0.19-eb9e1ff — 2019-10-06
- 1.0.18-b7bb012 — 2019-09-28
- 1.0.17-928f791 — 2019-09-28
- 1.0.12-83a1866 — 2019-07-27
- 1.0.11-c2a28f4 — 2019-07-21
- 1.0.10-8e06e59 — 2019-07-20
- 1.0.9-5e55de5 — 2019-07-20
- 1.0.8-7b807d9 — 2019-07-20
- 1.0.7-aaa1c53 — 2019-07-20
- 1.0.6-7ac85e1 — 2019-07-20
- 1.0.5-bb4b521 — 2019-07-20
- 1.0.4-cca37f7 — 2019-07-20
- 1.0.3-c8b73d8 — 2019-07-20
- … 1 more at https://npm.io/package/@koeroesi86/node-lambda-invoke/versions

## README

# Node Lambda invoke [![Build status](https://api.travis-ci.org/Koeroesi86/node-lambda-invoke.svg?branch=master)](https://travis-ci.org/Koeroesi86/node-lambda-invoke)

A library that can be easily used for AWS lambda functions locally

## Dependencies

* [Node](https://nodejs.org/en/)
* [Yarn](https://yarnpkg.com/lang/en/) (optional)

## Usage

```bash
yarn add @koeroesi86/node-lambda-invoke
```

Or with npm
```bash
npm i --save @koeroesi86/node-lambda-invoke
```

## Example

```javascript
const http = require('http');
const { httpMiddleware } = require('@koeroesi86/node-lambda-invoke');

const host = 'localhost';
const port = 8080;

const lambdaPath = './pathOfLambda.js';
const handlerKey = 'handler';
const logger = console.log;
const limit = 100; // overall limit ox running lambdas

http
  .createServer(httpMiddleware({
    lambdaPath,
    handlerKey,
    logger,
    limit,
    communication: {
      // file|ipc|custom --- When 'custom' used, path is needed
      type: 'ipc',
    }
  }))
  .listen(
    { host, port, exclusive: true },
    () => console.log(`Server running on http://${host}:${port}`)
  );
```


## Running locally

```bash
yarn start
```

## Configuration

Coming soon, currently a basic `.env` way is available...

---
_Source: https://npm.io/package/@koeroesi86/node-lambda-invoke · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
