Brinsley
03/26/2022, 8:06 AMEventBus
construct Using the entirety of the RuleProps
interface from CDK:
new EventBus(this, "scheduler", {
rules: {
rule1: {
targets: ["path/to/file.handler"],
schedule: Schedule.cron({ minute: "1" })
}
}
})
Gives the error:
Cannot associate rule with 'eventBus' when using 'schedule'
Might want to look through what's compatible and what's being omitted on EventBusCdkRuleProps
Brinsley
03/26/2022, 8:08 AMaws-events/lib/rule.js
Frank
Cron
construct for u?Brinsley
03/27/2022, 5:53 PMRule
construct that's the problem, looking at the source in CDK the error is thrown because bot eventBus
AND schedule
are both defined:
...
props.eventBus&&props.schedule)throw new Error("Cannot associate rule with 'eventBus' when using 'schedule'");
This isn't an SST "problem" to fix necessarily since the configuration just is allowed by CDK - was more raising it so you guys could potentially self-protect against it with your type definitions 🙂