Request: Specify timezone for Lambda rate expression

1

Hello,

It appears that the rate expression that allows specification of a trigger time as a cron expression is based on the UTC timezone[1].

I need to trigger a Lambda function every morning at 9am Paris, France, time, but because of Daylight Saving Time I'm currently forced to update the cron expression manually twice a year. If I could specify a timezone such as "Europe/Paris" I wouldn't have this problem as I guess the cron-equivalent is based on the 'server' timezones and would choose the correct time taking into account DST.

As it doesn't seem possible at the moment (but I'm happy to learn in case it is!), I'd like to submit this request to provide a configuration option that allows to specify a timezone. It should support the "Zone name used in value of TZ environment variable" ("America/Vancouver"), but could also allow for UTC offsets ("UTC+3") and similar.

Thanks for considering this request,
Jakob.

[1] https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html

질문됨 6년 전2064회 조회
2개 답변
0

If you’re using the Serverless framework, there is a plug in for that.

https://github.com/UnitedIncome/serverless-local-schedule

jelder
답변함 6년 전
  • The problem with that approach is it fails every time there is an adjustment to the time zone rules.

0

Thanks for the pointer to the serverless plugin! I am indeed using serverless so that is exactly what will solve my problem. That being said and looking at the way the plugin manages the DST period, it is a clever workaround, but still just a workaround. But it's great it exists! :-)

답변함 6년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠