🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

schedule-aws-lambda

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schedule-aws-lambda

attach a schedule to an existing aws lambda function

0.0.1
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

schedule-aws-lambda

attach a schedule to an existing aws lambda function

npm status

example

npm i schedule-aws-lambda

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:

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:

require('schedule-aws-lambda')(dependencies)
    .execute({ functionName, functionInput }, { ruleName, ruleDescription, ruleId = ulid(), scheduleExpression })
    .then(...)

for further details examine the source and jsdocs

license

MIT © Yaniv Kessler

Keywords

aws

FAQs

Package last updated on 16 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts