Skip to content

Commit 9a78db4

Browse files
authored
Merge pull request #597 from cm-uehara/issue-571
docs: update README with EventBridge Scheduler
2 parents 8772ae7 + d0da73c commit 9a78db4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Serverless Framework v2.32.0 or later is required.
4444
- [Specify Name and Description](#specify-name-and-description)
4545
- [Scheduled Events IAM Role](#scheduled-events-iam-role)
4646
- [Specify InputTransformer](#specify-inputtransformer)
47+
- [Use EventBridge Scheduler instead of EventBridge rules](#use-eventbridge-scheduler-instead-of-eventbridge-rules)
4748
- [CloudWatch Event](#cloudwatch-event)
4849
- [Simple event definition](#simple-event-definition)
4950
- [Enabling / Disabling](#enabling--disabling-1)
@@ -1099,6 +1100,26 @@ stepFunctions:
10991100
...
11001101
```
11011102

1103+
#### Use EventBridge Scheduler instead of EventBridge rules
1104+
1105+
AWS has account-wide limits on the number of `AWS::Event::Rule` triggers per bus (300 events), and all Lambda schedules go into a single bus with no way to override it. This can lead to a situation where large projects hit the limit with no ability to schedule more events.
1106+
1107+
However, `AWS::Scheduler::Schedule` has much higher limits (1,000,000 events), and is configured identically. `method` can be set in order to migrate to this trigger type seamlessly. It also allows you to specify a timezone to run your event based on local time.
1108+
1109+
```yml
1110+
stepFunctions:
1111+
stateMachines:
1112+
stateMachineScheduled:
1113+
events:
1114+
- schedule:
1115+
method: scheduler
1116+
rate: cron(30 12 ? * 1-5 *)
1117+
enabled: true
1118+
timezone: America/New_York
1119+
definition:
1120+
...
1121+
```
1122+
11021123
### CloudWatch Event / EventBridge
11031124

11041125
#### Simple event definition

0 commit comments

Comments
 (0)