Home > other >  Delay in execution of step function when I have multiple cloudwatch rules triggering same step funct
Delay in execution of step function when I have multiple cloudwatch rules triggering same step funct

Time:01-07

We have setup a process where multiple cloudwatch rules trigger same step function.We have defined 10 cloudwatch rules and all of them trigger same step function after every 30 mins.But I see that the step function is triggered at different time instead all 10 starting at same time.Ex

cloudwatch rule 1 -- Stepfunction trigger at (08:00:10)

cloudwatch rule 2 -- Stepfunction trigger at (08:00:20)

cloudwatch rule 3 -- Stepfunction trigger at (08:00:25)

cloudwatch rule 4 -- Stepfunction trigger at (08:00:34)

cloudwatch rule 5 -- Stepfunction trigger at (08:00:40) and so on..

Does anyone know the reason for the difference in seconds.We want the process to complete with in 5 mins but if last cloudwatch rule triggers the step function after 1 min than the actual time then it would delay the process

CodePudding user response:

Triggering variability is expected. For CloudWatch cron schedule rules, for instance, "Due to the distributed nature of the CloudWatch Events and the target services ... your scheduled rule is triggered within that minute, but not on the precise 0th second."

You could try combining the events into a single event and using a step functions Map state to process them concurrently in a single execution.

  •  Tags:  
  • Related