AWS, Cloud Computing

3 Mins Read

Easily Schedule your Tasks using Amazon EventBridge Scheduler

Introduction

Amazon EventBridge Scheduler is a newly introduced feature from Amazon EventBridge that allows you to create, run, and manage scheduled tasks. With Amazon EventBridge Scheduler, you can schedule one-time schedules or millions of recurring tasks across many AWS services/targets without provisioning or managing the infrastructure.

AWS introduced this feature to address the issue of using a custom-built scheduling tool for one’s application, leading to application complexity, slow application development, and increased cost. Those custom-built tools can trigger a limited target, and managing the concurrency and application performance is difficult.

This blog will look at an overview of the Amazon EventBridge Scheduler and how it provides the capabilities absent in the EventBridge Rules.

Benefits of using Amazon EventBridge Scheduler

Before jumping into the Scheduler, we will first look at what EventBridge Rules are to understand better what EventBridge Scheduler does.

EventBridge Rules have two different functions that you can choose to use:

  1. Rule with an event pattern – This allows you to act on many events. When a matching event is found, the event is routed to the targets specified in the rule (e.g., Lambda Function, SQS, SNS, and other services). A rule can have one or more targets associated with it.
  2. Event Schedule – This allows you to create a recurring schedule that periodically triggers an event at a specified time interval.

In the schedule, there are two options available:

Rate: Here, we can set a unit value in Hours, Minutes, or Days. According to this rate, the event is triggered regularly.

Cron: Using this, we can set more complex patterns similar to Unix based cron jobs—for example, an event that triggers every 7 PM Friday.

To use either of these features above, you must have an Event Bus. An EventBus is a component in the Amazon EventBridge service that lets you receive, filter, transform, route, and deliver events.

When the rule is created, you can enable it immediately or whenever required afterward. But you will not be able to enable the rule at a particular time automatically, and you must either do it in the console or programmatically enable it. Also, using Amazon EventBridge Rules, you cannot create a rule that is triggered for one time only.

You can use the new Amazon EventBridge Scheduler feature to overcome these drawbacks. Now we will see how this works.

Each schedule needs to be placed in a scheduled group. By default, a schedule is placed in the ‘Default’ group. You can also create your schedule group. You can only add tags to a scheduled group, not a schedule.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Types of Event Scheduling

  1. One-time schedule

One-time schedule is where an event will fire at a specific time only once and can be deleted afterward. For example, triggering an event tomorrow at 9:00 AM IST.

This is very useful in scenarios where there is a requirement to send out a reminder email after a certain time of event occurrence.

sch

2. Recurring schedule

EventBridge Scheduler also allows you to create recurring schedules. Recurring schedules work almost the same as EventBridge Rules Schedule. As mentioned earlier, they both have the option of rate and cron based scheduling.

However, the difference is that Scheduler offers more features like when to start and end the schedule. For example, we can create a schedule that will trigger an event every Monday at 9:00 AM, but only between January 1st and 31st. Once the schedule is created, it will automatically trigger events from January 1st with no extra intervention from you.

sch2

Features of Amazon EventBridge Scheduler

Amazon EventBridge Scheduler also has many other important features, like,

  • Option of setting a retry policy and a Dead-Letter queue.
  • It has 1 million schedules per account quota as a soft limit compared to 300 rules per account per region of EventBridge Rules.
  • It supports Daylight saving time (DST) in the Time zone option.
  • It supports Over 270 services and over 6,000 API Actions with AWS SDK as targets.
  • It does not require any event Bus, unlike Amazon EventBridge Rules.

Conclusion

EventBridge Rules was a useful feature for many applications. Still, it does not have exact schedule controls such as start and stop time, and configuring a one-time event was impossible to configure.

However, EventBridge Scheduler is a great improvement over EventBridge Rules. You get missing features and new features that can keep you informed in case the target does not respond. The one-time events scheduling feature is simple but useful in many use cases. Hence the Event Schedule option of EventBridge Rules will be completely replaced by the EventBridge Scheduler with many more capabilities.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft Gold Partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Amazon EventBridge Scheduler and I will get back to you quickly.

To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.

FAQs

1. In which case should I use EventBridge Rules instead of Amazon EventBridge Scheduler?

ANS: – If a case requires you to listen for specific types of events, and triggers an action based on that, then you should be using EventBridge Rules.

2. Is Amazon EventBridge Scheduler included in AWS Free Tier?

ANS: – Yes, all state change events published by AWS services are free. But You may incur additional data transfer charges among regions for cross-Region invocations. You will be billed at standard AWS Data Transfer Charges.

WRITTEN BY Vignesh K S

Vignesh K S works as a Research Associate at CloudThat. He is interested in learning the latest technologies and methodologies related to Cloud Services and Development in Cloud using serverless services.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!