# lambdacadabra

> Magical wrapper for functions intended to run in AWS Lambda

Latest version **0.0.2** (published 2016-12-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install lambdacadabra
pnpm add lambdacadabra
yarn add lambdacadabra
bun add lambdacadabra
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-12-15 |
| First published | 2016-12-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thiago Campezzi |
| Maintainers | campezzi |
| Keywords | lambda, aws |

## Links

- npm: https://www.npmjs.com/package/lambdacadabra
- Repository: https://github.com/campezzi/lambdacadabra
- Homepage: https://github.com/campezzi/lambdacadabra#readme
- Issues: https://github.com/campezzi/lambdacadabra/issues
- npm.io page: https://npm.io/package/lambdacadabra

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.20.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2016-12-15
- 0.0.1 — 2016-12-15

## README

# lambdacadabra

This is a simple library that transforms any function into an AWS Lambda handler.


### Installation

    $ npm install --save lambdacadabra

First, define the function that will be turned into a handler. That function will be called with
the lambda's payload and context:

```js
const doSomeWork = (payload, context) => 'Hello, World!';
```

Then use `lambdacadabra` to turn that function into a handler:

```js
module.exports.handler = lambdacadabra(doSomeWork);
```

The return value of the function will be passed as the second parameter to the AWS Lambda's callback
function. If an error is thrown while executing the function, it will be caught and passed as the
first parameter to that callback.

`lambdacadabra` will also log errors, including the offending payload. To take advantage of that
feature, make sure your lambda's execution role has permissions to write to CloudWatch Logs.

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