Search code examples
aws-step-functions

AWS Step Functions with multiple executions


I have the following Step Function:

enter image description here

{
  "Comment": "Test Lambda with Wait",
  "StartAt": "wait_using_seconds",
  "States": {
    "wait_using_seconds": {
      "Type": "Wait",
      "SecondsPath": "$.timer_seconds",
      "Next": "lambda_test"
    },
    "lambda_test": {
      "Type": "Task",
      "Resource": "arn:aws:lambda:us-east-1:00000000000:function:XXXXXXXX",
      "End": true
    }
  }
}

This Step Function receives dynamic input data for the Lambda so it's enough flexible to be called for different purposes.

I might have some Executions with 1 hour wait, others with 3 hours, and so on.

Let's say I will have 5,000 Running Executions of the same Step Function. Each Execution having its own unique "name". Then I stop an Execution then I get the following status:

enter image description here

Is it possible to create a new Execution using the same "name" of the aborted execution? Or is it possible to restart an aborted execution? Or this is not a good practice?

Other question is:

When an execution is stoped (aborted) It will only generate the cost of the states it executed until it was aborted so no extra cost will be generated in AWS Billing correct?

And last question is:

Is regarding the limit of 1,000,000 open executions... enter image description here

Open executions equals to running executions? So for example if I have 10 running executiong and then I abort 5 of them, then I just have 5 "open" executions?


Solution

  • You can not re-start an aborted execution; aborted means aborted :)

    The names of the invocations must be unique for your account/region over the last 90 days.

    My understanding of AWS billing is that you pay per transition, so if a step function didn't make it to a step, you don't pay. I.e. if you have a 1,000 step step function, and stop it after step 2, you only pay for 2 transitions.

    Yes, open executions = running executions. Note, this is a soft limit and can be increased. H