Amazon EventBridge is a serverless service that makes it easy to create event-driven applications. It is capable of many-many and point-point routing. One feature of EventBridge that is useful is its ability to schedule events to be sent at specific times, using EventBridge Schedules.

I recently had an opportunity to use this feature on a project, and I’m excited to share my experience.


First, some history on EventBridge. Amazon CloudWatch Events was the event bus before EventBridge. CloudWatch Events and EventBridge use the same underlying service and API, but EventBridge provides more features. EventBridge is designed to extend the event model beyond AWS, bringing data from Software as a Service (SaaS) providers into your AWS environment. This means you can consume events from popular providers such as Zendesk, PagerDuty, and Auth0.Scheduling Workloads with EventBridge Schedules-diagrams_diagram-1
There are three different types of schedules. There's rate-based, cron-based, and one-time schedules. A rate-based schedule starts after the start date you specify for your schedule and runs at a regular rate that you define until the schedule's end date (this is what we used). It can range from one-minute intervals to several days, or more. A cron-based schedule creates a fine-grained recurring schedule that runs at a specific time of your choosing. A one-time schedule is just that: you tell the schedule when to run and it does it at that one time.

Let’s briefly go over some example use cases for schedules. If you need to generate an Amazon Inspector assessment every week, then an EventBridge Schedule is a good place to start. Maybe you need to reboot an instance every other day and use a schedule. You can even generate CloudFormation templates. On the project I mentioned earlier, we used a schedule to start a StepFunction state machine every minute.Scheduling Workloads with EventBridge Schedules-diagrams_diagram-2 Now to my experience. I was working on a project tasked with the migration and modernization of an ETL workload. It consisted of several components (Lambdas, a PHP application, databases, and so on). I specifically helped with the scheduling of the Lambdas. The Lambda Functions did the ETL and needed to run indefinitely. There were four Lambdas put into a StepFunction to run in sequence. I created an EventBridge Schedule with a target of running that StepFunction every minute. It was that simple. 

Please contact us for more information.‍