Files
nexus/wiki/entities/AWS-Step-Functions.md

57 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "AWS Step Functions"
type: entity
tags:
- AWS
- Serverless
- Workflow
- Orchestration
sources:
- public-cloud-learning-sessions-opentext-serverless-computing-20240903-160139-mee
last_updated: 2026-04-14
---
## Aliases
- Step Functions
- AWS Step Functions
- Amazon Step Functions
## Definition
AWS Step Functions 是 AWS 的无服务器工作流编排服务基于状态机State Machine协调多个 Lambda 函数和 AWS 服务的执行顺序和错误处理逻辑,使开发者无需编写复杂的编排代码即可构建可靠的多步骤业务流程。
## Core Properties
| 属性 | 值 |
|------|-----|
| 核心抽象 | 状态机Standard 和 Express 两种) |
| Standard 工作流 | 长时运行,最长 1 年,支持精确执行历史 |
| Express 工作流 | 高频场景,最长 5 分钟,支持极高吞吐量 |
| 状态类型 | Task、Choice、Wait、Pass、Parallel、Map、End、Throw |
| 错误处理 | 内置 Retry、Catch 和 Error 字段 |
| 可视化 | 自动生成工作流图形,直观展示执行路径 |
## Workflow Flavors
| 类型 | 适用场景 | 执行时长 | 计费模式 |
|------|---------|---------|---------|
| Standard | 长时业务流程、审批流、数据处理管道 | 最长 1 年 | 按状态转换计费 |
| Express | 高频事件处理、IoT 数据流水线、实时流处理 | 最长 5 分钟 | 按执行次数+GB/s计费 |
## State Types
Step Functions 提供丰富的状态类型构建复杂工作流:
- **Task**:执行单个原子工作单元(如调用 Lambda、DynamoDB 操作)
- **Choice**:条件分支,基于数据动态路由执行路径
- **Wait**:等待指定时间(用于轮询、重试间隔)
- **Pass**:直接传递输入到输出(数据转换)
- **Parallel**:并行执行多个分支,汇合结果
- **Map**:迭代处理数组中的每个元素
- **End/Try-Throw**:终止和错误处理
## Connections
- [[AWS-Step-Functions]] ← orchestrates ← [[AWS-Lambda]]
- [[AWS-Step-Functions]] ← is_a ← [[Serverless-Computing]]
- [[AWS-Step-Functions]] ← triggers ← [[Amazon-EventBridge]]