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.
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.
"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.
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: