Member-only story
Build AWS Serverless Scheduled Tasks with Amazon EventBridge and CDK
#aws#serverless#eventbridge#cronjob
Scheduled tasks automate routine and repetitive tasks and reduce the risk of human error. They ensure that essential tasks occur on time, thus improving productivity and efficiency.
In the Serverless domain, we have a couple of ways to implement them.
This blog post will teach you to leverage Amazon EventBridge to create scheduled tasks using AWS CDK. You will learn about implementing cron (scheduled) jobs with Amazon EventBridge rules and the newer EventBridge scheduler.
We will go over the differences between the two options, and implement scheduled tasks using both methods with Python AWS CDK constructs.
A fully deployable template project and code examples are found here.
This blog post was originally published on my website, “Ran The Builder.”
Amazon EventBridge
We all had to define a scheduled task at one time. I’m old enough to remember we used to call them “cron jobs” back in the happy Linux days when I used to write a cron job process that would make sure my primary process was up and running at all times.