This feature is available since Webiny v5.39.0.
AWS Lambda can run up to 15 minutes. Webiny provides a mechanism for checking on how much time is there left before the Lambda times out, but it is up to the developer to use it. You can read about it here.
AWS Step Function can live up to 1 year. This is the maximum time for the Step Function, set by AWS, and it cannot be increased.
AWS Step Function has a hard limit of 25,000 state changes - executions. It cannot be increased.
AWS Step Function does not provide a built-in mechanism to limit the number of state changes on each task run.
This means that a task can go into unwanted loop and execute up to 25,000 times, which is something that we want to avoid, or at least, control it.
What Webiny does to help with this is count the number of the Lambda handler executions, and if the number is greater than defined, it will end the task with an error.
To change the limit, see
maxIterations parameter when defining the Background Task.