# schedule-aws-lambda

> attach a schedule to an existing aws lambda function

Latest version **0.0.1** (published 2017-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install schedule-aws-lambda
pnpm add schedule-aws-lambda
yarn add schedule-aws-lambda
bun add schedule-aws-lambda
```

## 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.1 |
| Published | 2017-12-16 |
| First published | 2017-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.0.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yaniv Kessler |
| Maintainers | kessler |
| Keywords | aws, cron, lambda, schedule |

## Links

- npm: https://www.npmjs.com/package/schedule-aws-lambda
- npm.io page: https://npm.io/package/schedule-aws-lambda

## Dependencies (2)

- [ulid](https://npm.io/package/ulid.md) ^2.2.3
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1

## 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.1 (latest) — 2017-12-16

## README

# schedule-aws-lambda

**attach a schedule to an existing aws lambda function**

[![npm status](http://img.shields.io/npm/v/schedule-aws-lambda.svg?style=flat-square)](https://www.npmjs.org/package/schedule-aws-lambda) 

## example

`npm i schedule-aws-lambda`

```js
const { Lambda, CloudWatchEvents } = require('aws-sdk')
const lambda = new Lambda()
const cloudwatch = new CloudWatchEvents()
const schedule = require('schedule-aws-lambda')(lambda, cloudwatch)

schedule('the-function-name').withInput({ foo: 'bar' }).at('rate(5 minutes)').then(console.log)
```

## api

This module exposes the following fluent interface:
```js
require('schedule-aws-lambda')(dependencies)(functionName)
    .[withInput(...) | input(...) | rule.id(...) | rule.name(...) | rule.description(...) ]
    .at(expression)
    .then(...)
```
_input() is an alias of withInput()_

alternatively one can use the `execute` api:
```js
require('schedule-aws-lambda')(dependencies)
    .execute({ functionName, functionInput }, { ruleName, ruleDescription, ruleId = ulid(), scheduleExpression })
    .then(...)
```

for further details examine the source and jsdocs

## license

[MIT](http://opensource.org/licenses/MIT) © Yaniv Kessler

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