I've got a bunch of AWS Lambda functions that I want to trigger at certain times of day, but those times are in different timezones. For example, I might want events to trigger at:
...and so on.
Using Cloudwatch events, regardless of which AWS region I use, it seems that I can only specify events to trigger using UTC (i.e. London time). For today, that's fine; I can work out the time differences between London and Sydney, and London and Chicago, and so on - however, summer time comes into effect on different dates in different cities, and it'll cause my Lambdas to trigger at the wrong times when it does.
Is there a way to trigger these Cloudwatch events using non-UTC time settings? Alternately, is there a mechanism other than Cloudwatch that I can use to trigger Lambda functions at specific times of day, AND specify those times in the timezone I want?
Thanks in advance
Rules in CloudWatch Events work only in the Region in which they are created. If you configure CloudTrail to track API calls in multiple Regions, and you want a rule based on CloudTrail to trigger in each of those Regions, you must create a separate rule in each Region that you want to track.
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ . In the navigation pane, choose Dashboards, and then choose a dashboard. In the upper-right corner of the dashboard screen, choose Custom. In the upper-right corner of the box that appears, select UTC or Local time from the dropdown.
Amazon CloudWatch can't aggregate data across Regions. Metrics are completely separate between Regions". But then it follows by an example which states, "For example, you can aggregate statistics for your EC2 instances that have detailed monitoring enabled. Instances that use basic monitoring aren't included.
Be careful - London is currently (as of 6 February, 2017) UTC but, starting on the 26th of March 2017, they will be in BST - British Summer Time which will be UTC + 1. In other words, London time is not necessarily UTC.
To me, the best bet is to have another lambda update the cloudwatch trigger time based on known timezone changes. You don't show your implementation language but, as an example, in Java you could take a look at this post. Run this Lambda once a day at UTC time zero and update the cloudwatch rule times appropriately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With