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 Risposte
2
Risposta accettata

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
ESPERTO
con risposta un anno fa
  • 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
ESPERTO
Uri
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande