cdk-scheduled-lambda

1.0.0 • Public • Published

AWS CDK Scheduled Lambda

An AWS CDK Construct that wraps a Lambda function alongside an AWS Events Rule that is set up on a schedule.

Installation

npm install cdk-scheduled-lambda

Example:

this.newFn = new ScheduledLambda(this, "new-fn", {
  lambdaProps: {
    // @aws-cdk/aws-lambda Function props
    runtime: Runtime.NODEJS_14_X,
    timeout: Duration.seconds(20),
    // ...
  },
  schedule: "cron(0 * * * ? *)", // Run this script once an hour
});

To access the underlying event rule or Lambda, access the schedule or fn props

/cdk-scheduled-lambda/

    Package Sidebar

    Install

    npm i cdk-scheduled-lambda

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.75 kB

    Total Files

    5

    Last publish

    Collaborators

    • lannonbr