'How to change the Timezone in AWS Cloudwatch Event Cron expression?

Requirement: We have 4 clients in 4 different regions and we need to set up a Cron expression in the cloud watch event which needs to trigger lambda at a particular time every day.

Currently Cloudwatch is triggering the event based on GMT, how to change the timezone ?



Solution 1:[1]

You have to calculate the GMT times for the different regions yourself and then set them in EventBridge (CloudWatch).

For example, if you want to trigger an event at 5am local New York City (EDT) time, you need to convert that to GMT time. Which at the moment would be 9am. Then you set that value in your EventBridge (CloudWatch) event.

Solution 2:[2]

If you are using Serverless, then you can use the Serverless Local Schedule plugin, which can do the time zone conversions for you.

events:
  - schedule:
      rate: cron(0 8-20 * * ? *)
      timezone: Australia/Sydney

plugins:
  - serverless-local-schedule

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jens
Solution 2 Matt Johnson-Pint