Easy housekeeping with the new capability of Amazon EventBridge Scheduler

· 2 min read
Easy housekeeping with the new capability of Amazon EventBridge Scheduler

To create, trigger, and manage scheduled events and tasks, we use Amazon EventBridge Scheduler (serverless offering). Over time, we accumulate a large number of unused finished schedules, which count towards your account's quota (1 million schedules by default). To meet the demands of many enterprise use cases, it is necessary to regularly remove completed schedules and maintain a tidy Schedules dashboard. But this requires either manual effort or a custom program for automation.

Default quota of 1 million schedules per account can be increased by raising a request through the Service Quotas dashboard.

As of August 2nd, Amazon EventBridge Scheduler has added a new feature that allows users to set schedules for automatic deletion once the last invocation is completed.

Amazon EventBridge Schedule: "A schedule invokes a target one-time or at regular intervals defined by a cron or rate expression."

"Action after schedule completion" capability is available for both "One-time schedule" and "Recurring schedule".

When you create an Amazon EventBridge Schedule, you will find a new section named "Action after schedule completion" on the settings page.

Action after schedule completion: "If you choose DELETE, EventBridge Scheduler will automatically delete the schedule after it has completed its last invocation and has no future target invocations planned."

For testing purposes, I have created one-time schedule which will send "Hello!" to SQS target. I have set "Delete" as action after schedule completion.

Before invocation:

After target (Amazon SQS) invocation:

After refresh, we can see no schedule because it got deleted after the invocation.

Video Demo: