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 Answers
2
Accepted Answer

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
EXPERT
answered a year ago
  • 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
EXPERT
Uri
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions