AWS Step Functions のアイコン

AWS Step Functions Popular2016年〜

Visually design and execute workflows that combine multiple AWS services

What It Does

AWS Step Functions lets you visually design and automatically execute workflows (sequences of processing steps) that combine multiple AWS services. You can run Lambda functions, ECS tasks, SQS messages, DynamoDB operations, and more in sequence, in parallel, or with conditional branching. It automatically manages execution state for each step and supports built-in retries and error handling.

Use Cases

Order processing workflows (inventory check, payment, shipping), data processing pipelines (fetch, transform, store), ML model training pipelines, approval flows, microservice orchestration, and ETL automation.

Everyday Analogy

Think of a cooking recipe. The recipe (state machine) lists steps: chop ingredients, stir-fry, simmer, plate. Step Functions follows the recipe automatically, retrying if something goes wrong (burns). It can even work on multiple dishes at once (parallel processing).

What Is Step Functions?

AWS Step Functions is a serverless orchestration service for building distributed application workflows. Workflows are defined as state machines in JSON, declaratively specifying execution order, conditional branching, parallel processing, and error handling for each step (state). The console provides real-time visualization of workflow execution, making it easy to see which steps succeeded or failed.

State Types

Step Functions offers multiple state types. Task states invoke Lambda functions or AWS service APIs. Choice states branch based on conditions. Parallel states execute multiple branches simultaneously. Wait states pause for a specified duration. Map states iterate the same processing over each element of an array. Combining these lets you express complex business logic.

Express and Standard Workflows

Step Functions offers two workflow types. Standard workflows support executions up to 1 year and preserve execution history - ideal for long-running workflows or processes requiring audit trails. Express workflows support executions up to 5 minutes at over 100,000 executions per second - suited for high-frequency, short-duration processing like IoT data or streaming data transformation. For practical knowledge on Express and Standard workflows, specialized books on Amazon are helpful.

Getting Started

Create a state machine in the Step Functions console. Workflow Studio, a visual editor, lets you design workflows with drag and drop. Add Lambda functions as steps, define execution order, and your basic workflow is ready. Click "Start execution" to run the workflow and monitor each step's progress in real time.

Things to Watch Out For

  • Standard workflows are billed per state transition - watch costs for workflows with many steps
  • Express workflow execution history is only stored in CloudWatch Logs - choose Standard if audit requirements apply
  • The always-free tier includes 4,000 state transitions per month
共有するXB!