Triggering Amazon EventBridge schedules in intervals less then 1 minute

0

Hi all, I'm trying to trigger a lambda function cron-based in ~10 seconds time intervals. Amazon EventBridge Scheduler supports 1 minute as minimum. What could be options here? Is Amazon EventBridge Scheduler is a wrong tool to fulfill this requirement?

2回答
2
承認された回答

A cheaper option is to use Event Bridge + Lambda + SQS. As in the Step Function solution Event Bridge triggers a Lambda every X minute (x<15), and the Lambda puts X*6 messages in the queue with increasing message timer values in multiple of 10 secs. You then configure the queue as event source for Lambda with a batch size of 1. The execution time might be more approximate than for Step Function, but the cost of this solution is ~ 1/30th of the Step Functions solution.

AWS
エキスパート
回答済み 1年前
  • Thanks for this proposal. I've implemented this. Do I really need to set Lambda with a batch size of 1, what is the difference if don't set that?

1

Use EventBridge scheduler to invoke a Step Function state machine every minute. The state machine will invoke the lambda function in a loop with a 10 seconds delay between invocations.

profile pictureAWS
エキスパート
Uri
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ