Dev Ramble

Guides, how-to's and other nonsensical ramblings from a software engineer

Home

How to Schedule Lambda Functions in AWS Console

July 31, 2021

A common use case for AWS Lambda functions is to run them regularly on a schedule. This can be used in a wide range of scenarios, from periodically performing some web scraping to sending out regular updates using SNS. In this blog post, I’ll walk through the steps you need to take to start running your Lambda function on a schedule using only the AWS console.

Creating an EventBridge rule

Assuming you have already implemented a Lambda function you would like to schedule, start by navigating to Amazon EventBridge in your AWS console.

EventBridge

Click “Create rule”. Give the rule a name, then under “Define pattern”, select “Schedule”. For most simple use cases, you can just use “Fixed rate every” to set a schedule for every X number of Minutes, Hours or Days. For more granular control over the scheduling, you can also provide a CRON expression.

Create Rule

Next we need to set our Lambda function as the target which will be invoked by the scheduled event. Under the “Select targets” section, select “Lambda function” and find your function in the following dropdown.

Select Target

Finally, click “Create” at the bottom of the page. That’s all you need to do, your Lambda function will now be invoked according to the schedule you configured.

You can double-check that your Lambda is now running on schedule by opening CloudWatch and showing Invocations for your Lambda function.

Invocations

Share This Post