-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Describe the feature
In the console, when creating a Rule with an Event schedule, I have the option to use UTC or 'Local time zone'.
I can't seem to find a way of specifying this in CDK. It would be helpful if this is possible.
Here's my current implementation - if there's something I can add to this, that would be great.
const rule = new Rule(this.parent, `${this.stackName}-Rule-${ruleName}`, {
ruleName: `${this.stackName}-${ruleName}`,
schedule: Schedule.cron({
minute: "0",
hour: "8,20",
}),
});
Use Case
For timezones such as Europe/London, currently if I want the schedule to be consistent all year around I need to manually update this field in the console after creating the Rule via CDK.
Proposed Solution
An additional field, timeZone
or similar.
const rule = new Rule(this.parent, ${this.stackName}-Rule-${ruleName}
, {
ruleName: ${this.stackName}-${ruleName}
,
schedule: Schedule.cron({
minute: "0",
hour: "8,20",
timeZone: "Europe/London"
}),
});
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.32.0
Environment details (OS name and version, etc.)
MacOS Monterey 12.4