Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

AWS Lambda Sample: Scheduled Lambda

The Scheduled Lambda example demonstrates how an AWS Lambda function can be invoked automatically based on a time schedule.

Repository files

  • : Main program source file
  • : AWS Lambda function that is invoked on a time schedule
  • : Utility functions to manage AWS Lambda functions

AWS infrastructure resources

  • AWS Lambda function
  • AWS Identity and Access Management (IAM) role for the AWS Lambda function
  • Amazon EventBridge/Amazon CloudWatch Events rule that invokes the Lambda function based on a schedule



To create and enable the Scheduled Lambda infrastructure:


To toggle (enable/disable) the Scheduled Lambda event rule:

python -t
python --toggle

To delete the Scheduled Lambda infrastructure:

python -d
python --delete

By default, the defined EventBridge/CloudWatch Events rule is enabled and scheduled to invoke the Lambda function every minute.

To verify that the EventBridge/CloudWatch Events rule is invoking the Lambda function, use the AWS console to check the CloudWatch log files. The Lambda function writes event data to a log file each time it is executed. If the log files are not being created or updated, verify that the EventBridge/CloudWatch Events rule is enabled.

You can’t perform that action at this time.