We have set an EventBridge to trigger a Lambda. It should run every day at 9:30AM Local time (US EST/EDT in my case). The problem is the date seems to be set in EventBridge by UTC. Is there a way to get this to always be based on a specific timezone? IE 9:30AM regardless of the season?
-
it would be more accurate to say that you want it to fire at _different_ times depending on the season, since DST is a seasonal adjustment to UTC. – erik258 Jul 24 '21 at 20:50
-
@DanielFarrell - yes that's another way of saying it. Is this possible, is the main question. Thanks! – amd3 Jul 24 '21 at 21:43
3 Answers
Updated: November 2022
Use EventBridge Scheduler as it allows you to schedule events at specific date-time along with timezone. Also supports one-time schedules.
Introducing Amazon EventBridge Scheduler - AWS Blog
Original: July 2021
Either schedule another event to adjust the first event, or execute the lambda at both 9:30 EST and 9:30 EDT and have the lambda figure out which one should run.
Run another lambda at 2am and 3am local time that can adjust the schedule of the first lambda for daylight saving time. You can use the lambda language's implementation to decide whether the event needs to be adjusted.
You could also schedule your original lambda to run at both the daylight-saving-adjusted and the non-adjusted time (so 14:30 UTC for EDT and 13:30 UTC for EST). Then the lambda could decide whether it was the proper time to execute based on a calendar check.
I prefer the first option because it's a clearer separation of duties.

- 430
- 5
- 11

- 14,701
- 2
- 25
- 31
-
Thanks, I was hoping there would be a conditional in EventBridge itself but i agree with the methods above. Appreciate you taking the time to review. – amd3 Jul 26 '21 at 13:29
Sadly, you can't do this, as only UTC time zone is used:
All scheduled events use UTC time zone and the minimum precision for schedules is 1 minute.
You would need custom solution for what you want to do. For example, let AWS EventBridge trigger a lambda function and the function evaluates what else should be triggered based on its conversions of UTC to local times.

- 215,873
- 14
- 235
- 294
-
Thanks, I was afraid of that at this time it just seems easier to manually update the schedule 2x/yr. – amd3 Jul 26 '21 at 13:28
-
1The new (as of Nov. 2022) EventBridge Scheduler allows you to schedule events at specific date-time along with timezone. Also supports one-time schedules. https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/ – Asker Jan 22 '23 at 10:39
As can be read in another answer here, this is possible using the EventBridge Scheduler
. In below example I'm using CDK to schedule a lambda at 6 am and 8 am, from Monday to Friday.
// Lambda
const func = new NodejsFunction(this, 'func-id', {
runtime: Runtime.NODEJS_18_X
});
// Role
const role = new Role(this, 'role-id', {
managedPolicies: [{ managedPolicyArn: 'arn:aws:iam::aws:policy/service-role/AWSLambdaRole' }],
assumedBy: new ServicePrincipal('scheduler.amazonaws.com')
});
// EventBridge Schedule
new CfnSchedule(this, 'schedule-id', {
flexibleTimeWindow: {
mode: 'OFF',
},
scheduleExpression: 'cron(0 6,8 ? * MON-FRI *)',
scheduleExpressionTimezone: 'Europe/Amsterdam',
target: {
arn: func.functionArn,
roleArn: role.roleArn,
},
});

- 183
- 2
- 12