0
0
AWScloud~10 mins

Step Functions for workflows in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Step Functions for workflows
Start Execution
State 1: Task or Choice
State 2: Task or Choice
State 3: Task or Choice
Success or Failure
End Execution
Step Functions run a series of steps (states) in order, moving from one task or decision to the next until the workflow finishes.
Execution Sample
AWS
{
  "StartAt": "Step1",
  "States": {
    "Step1": {"Type": "Task", "Next": "Step2"},
    "Step2": {"Type": "Task", "End": true}
  }
}
This workflow runs Step1, then Step2, then ends successfully.
Process Table
StepCurrent StateActionNext StateStatus
1Step1Execute TaskStep2Running
2Step2Execute TaskNoneSuccess
3EndWorkflow endsNoneCompleted
💡 Workflow ends after Step2 completes successfully.
Status Tracker
VariableStartAfter Step1After Step2Final
ExecutionStatusNotStartedRunningRunningSucceeded
CurrentStateNoneStep1Step2End
Key Moments - 2 Insights
Why does the workflow move from Step1 to Step2 automatically?
Because Step1's definition has "Next": "Step2", so after Step1 finishes, Step2 starts automatically (see execution_table step 1).
What happens if a state has "End": true?
The workflow stops after that state completes successfully, as shown in Step2 with "End": true (execution_table step 2).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the Current State at Step 2?
AStep1
BEnd
CStep2
DNone
💡 Hint
Check the 'Current State' column in execution_table row for Step 2.
At which step does the workflow end?
AStep 2
BStep 3
CStep 1
DIt never ends
💡 Hint
Look at the 'Status' column and see when it says 'Completed' in execution_table.
If Step1 had no "Next" or "End" field, what would happen?
AWorkflow would fail or stop at Step1
BWorkflow would skip Step1
CWorkflow would continue to Step2 automatically
DWorkflow would loop back to Step1
💡 Hint
Step1 must specify where to go next or end, otherwise workflow cannot continue (see key_moments).
Concept Snapshot
Step Functions define workflows as states.
Each state runs a task or makes a choice.
Use "Next" to go to the next state.
Use "End": true to finish the workflow.
States run in order until success or failure.
Full Transcript
AWS Step Functions let you build workflows by defining states. Each state can be a task or a decision point. The workflow starts at the state named in StartAt. After a state finishes, it moves to the next state defined by the "Next" field. If a state has "End": true, the workflow stops after that state. This way, you can chain tasks step-by-step to automate processes. The execution table shows each step running in order until the workflow completes successfully.