AWS Step Functions is a serverless workflow orchestration service that coordinates sequences of AWS service calls, Lambda functions, and external APIs. For AI pipelines - which typically involve multiple stages (ingest, process, model call, store results) - Step Functions provides the glue layer that handles sequencing, error handling, retries, and parallel execution.

Watch: AWS Step Functions (documentation overview)

AWS Step Functions: AWS documentation overview
A short walkthrough of a Step Functions workflow: each box is one step, with its input, output, and any failure visible.

The garden way to picture it: orchestration is a potting line. Every step happens in order, and you can see exactly which one jammed.

The garden metaphor
Orchestration as a potting line, every step in order. From the AI Film Crew course.

Why Step Functions for AI Pipelines

AI pipelines have characteristics that make orchestration critical:

  • Long-running processes - Document processing, model training, and batch inference can run for seconds to hours. Step Functions maintains state across these durations without keeping a Lambda function alive.
  • Multi-step dependencies - Step 3 cannot start until Steps 1 and 2 complete. Step Functions expresses these dependencies declaratively.
  • Error handling complexity - If the Textract call succeeds but the Bedrock call fails, do you retry Bedrock, restart from Textract, or route to a human review queue? Step Functions makes these branching decisions explicit and auditable.
  • Parallel execution - Processing 1000 documents simultaneously requires fan-out and fan-in logic. Step Functions Map state handles this natively.

Core Concepts

State machine - The workflow definition, written in Amazon States Language (JSON/YAML). Defines states (tasks, choices, parallel branches, wait, succeed, fail) and transitions between them.

Task state - Invokes an AWS service or Lambda function and waits for the result. Step Functions integrates natively with over 200 AWS services - you can call Bedrock, Textract, SQS, DynamoDB, and more without Lambda wrappers.

Choice state - Branches the workflow based on data from previous states. Used for routing logic: “if document type is invoice, go to invoice_processing; else go to general_processing.”

Map state - Executes a sub-workflow for each item in an array, concurrently or with a concurrency limit. Essential for batch processing patterns.

Wait state - Pauses the workflow until a callback token is returned (used for human approval steps) or a timestamp is reached.

AI Pipeline Pattern

A typical document processing pipeline in Step Functions:

  1. Validate - Lambda checks that the S3 object is a valid document type and size
  2. Extract (parallel) - Textract extracts text; a metadata step reads S3 object tags
  3. Enrich - Bedrock LLM call classifies and structures the extracted content
  4. Store - DynamoDB write for the structured result; S3 write for the enriched document
  5. Notify - SNS message to downstream consumers

Each step includes retry configuration (exponential backoff for API rate limit errors) and error handling (route failures to a dead-letter SQS queue with full execution context for debugging).

Express vs Standard Workflows

Standard Workflows - For long-running, auditable processes. State transitions are logged and can be reviewed in the console. Maximum duration 1 year. Priced per state transition. Use for document processing, claims workflows, and any process that needs audit trails.

Express Workflows - For high-throughput, short-duration processes. Up to 100,000 executions per second. Maximum duration 5 minutes. Priced per duration. Use for real-time API orchestration and event processing.

Integration with Bedrock

Step Functions has an optimized Bedrock integration (arn:aws:states:::bedrock:invokeModel). This means you can call Bedrock models directly from a Step Functions task state without a Lambda wrapper, reducing latency and simplifying the pipeline definition.

For agent steps, note that Amazon Bedrock Agents is now “Bedrock Agents Classic”: it went into maintenance mode on 30 July 2026 and is closed to new customers. Existing agents keep working, but AWS recommends Amazon Bedrock AgentCore for new agent builds. The orchestration pattern is the same either way: invoke the agent from a task state (typically through a Lambda wrapper, since agent responses are streamed), then branch on the agent’s result.

Sources

  1. AWS. “Invoke and customize Amazon Bedrock models with Step Functions.” AWS Step Functions Developer Guide, accessed 25 September 2026. https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
  2. AWS. “Amazon Bedrock Agents Classic availability change.” Amazon Bedrock User Guide, accessed 25 September 2026. https://docs.aws.amazon.com/bedrock/latest/userguide/agents-classic-maintenance-mode.html