Options for configuring the LambdaScheduler.

interface LambdaSchedulerOptions {
    duration: Duration;
    lambdaFunction: Function;
    enabled: boolean;
}

Properties

duration: Duration

Duration to invoke the Lambda function.

Note: Must be greater than 1 minute.

import * as cdk from 'aws-cdk-lib';

const interval = cdk.Duration.minutes(20); // Invoke the lambda every 20 minutes
lambdaFunction: Function

The Lambda function to be invoked at the specified duration.

enabled: boolean

Indicates whether the scheduler should be enabled.