بنقرة واحدة
step-functions
Manage AWS Step Functions state machines, executions, and workflow definitions via AWS CLI.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Manage AWS Step Functions state machines, executions, and workflow definitions via AWS CLI.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Manage AWS Certificate Manager certificates, validation, renewal, and import for ALB, CloudFront, and API Gateway via AWS CLI.
Manage Amazon API Gateway REST APIs, HTTP APIs, WebSocket APIs, stages, and deployments via AWS CLI.
Manage EC2 Auto Scaling groups, launch templates, scaling policies, and scheduled actions via AWS CLI.
Manage Elastic Load Balancers (ALB, NLB, CLB), target groups, listeners, and health checks via AWS CLI.
Manage AWS Organizations accounts, OUs, SCPs, and delegated administration via AWS CLI.
Manage Amazon SageMaker notebooks, training jobs, models, endpoints, and pipelines via AWS CLI.
| name | step-functions |
| description | Manage AWS Step Functions state machines, executions, and workflow definitions via AWS CLI. |
| metadata | {"openclaw":{"emoji":"🔄","requires":{"bins":["aws"]}}} |
Use this skill for workflow orchestration: creating and managing state machines, starting and monitoring executions, inspecting execution history, and managing activity workers.
states:* for full access, or scoped policies# List state machines
aws stepfunctions list-state-machines \
--query 'stateMachines[].{Name:name,ARN:stateMachineArn,Type:type,Created:creationDate}' \
--output table
# Describe a state machine
aws stepfunctions describe-state-machine \
--state-machine-arn <state-machine-arn>
# Get state machine definition
aws stepfunctions describe-state-machine \
--state-machine-arn <state-machine-arn> \
--query 'definition' --output text | jq .
# List executions (running)
aws stepfunctions list-executions \
--state-machine-arn <state-machine-arn> \
--status-filter RUNNING \
--query 'executions[].{Name:name,Status:status,Started:startDate}' \
--output table
# List recent executions (all statuses)
aws stepfunctions list-executions \
--state-machine-arn <state-machine-arn> \
--max-results 20 \
--query 'executions[].{Name:name,Status:status,Started:startDate,Stopped:stopDate}' \
--output table
# Describe a specific execution
aws stepfunctions describe-execution \
--execution-arn <execution-arn>
# Get execution history (step-by-step trace)
aws stepfunctions get-execution-history \
--execution-arn <execution-arn> \
--query 'events[].{Id:id,Type:type,Timestamp:timestamp}' \
--output table
# Get execution history with details (for debugging)
aws stepfunctions get-execution-history \
--execution-arn <execution-arn> \
--include-execution-data \
--max-results 50
# List activities
aws stepfunctions list-activities \
--query 'activities[].{Name:name,ARN:activityArn,Created:creationDate}' \
--output table
# Start an execution
aws stepfunctions start-execution \
--state-machine-arn <state-machine-arn> \
--input '{"key": "value"}'
# Start an execution with a name (for idempotency)
aws stepfunctions start-execution \
--state-machine-arn <state-machine-arn> \
--name "<execution-name>" \
--input '{"key": "value"}'
# Start a sync execution (Express workflows — waits for result)
aws stepfunctions start-sync-execution \
--state-machine-arn <state-machine-arn> \
--input '{"key": "value"}'
# Stop a running execution
aws stepfunctions stop-execution \
--execution-arn <execution-arn> \
--cause "Stopped by operator"
# Send a task success (for activity/callback patterns)
aws stepfunctions send-task-success \
--task-token <task-token> \
--output '{"result": "approved"}'
# Send a task failure
aws stepfunctions send-task-failure \
--task-token <task-token> \
--cause "Validation failed" \
--error "ValidationError"
# Send a task heartbeat
aws stepfunctions send-task-heartbeat --task-token <task-token>
⚠️ Cost note: Standard workflows: $0.025 per 1,000 state transitions. Express workflows: priced by number and duration of executions.
# Create a state machine
aws stepfunctions create-state-machine \
--name <state-machine-name> \
--role-arn <execution-role-arn> \
--type STANDARD \
--definition '{
"Comment": "A simple sequential workflow",
"StartAt": "FirstStep",
"States": {
"FirstStep": {
"Type": "Task",
"Resource": "<lambda-arn>",
"Next": "SecondStep"
},
"SecondStep": {
"Type": "Task",
"Resource": "<lambda-arn>",
"End": true
}
}
}'
# Create an Express workflow (high volume, short duration)
aws stepfunctions create-state-machine \
--name <state-machine-name> \
--role-arn <execution-role-arn> \
--type EXPRESS \
--definition file://definition.json
# Update a state machine definition
aws stepfunctions update-state-machine \
--state-machine-arn <state-machine-arn> \
--definition file://updated-definition.json
# Enable logging
aws stepfunctions update-state-machine \
--state-machine-arn <state-machine-arn> \
--logging-configuration '{
"level": "ALL",
"includeExecutionData": true,
"destinations": [{
"cloudWatchLogsLogGroup": {
"logGroupArn": "<log-group-arn>"
}
}]
}'
# Enable tracing (X-Ray)
aws stepfunctions update-state-machine \
--state-machine-arn <state-machine-arn> \
--tracing-configuration enabled=true
# Tag a state machine
aws stepfunctions tag-resource \
--resource-arn <state-machine-arn> \
--tags key=Environment,value=production
🛑 DESTRUCTIVE — Always confirm with the user before executing any of these commands.
# Delete a state machine (running executions will continue to completion)
aws stepfunctions delete-state-machine \
--state-machine-arn <state-machine-arn>
# Delete an activity
aws stepfunctions delete-activity \
--activity-arn <activity-arn>
⚠️ Deleting a state machine does NOT stop running executions. Stop them first if needed.
Retry and Catch blocks) in every Task state.Map states for parallel processing of collections.{
"Type": "Task",
"Resource": "<lambda-arn>",
"Retry": [{
"ErrorEquals": ["States.TaskFailed", "Lambda.ServiceException"],
"IntervalSeconds": 2,
"MaxAttempts": 3,
"BackoffRate": 2.0
}],
"Catch": [{
"ErrorEquals": ["States.ALL"],
"Next": "HandleError"
}],
"End": true
}
aws stepfunctions list-executions \
--state-machine-arn <state-machine-arn> \
--status-filter FAILED \
--max-results 10 \
--query 'executions[].{Name:name,Started:startDate,Stopped:stopDate}' \
--output table
# Get the error from a failed execution
aws stepfunctions describe-execution \
--execution-arn <execution-arn> \
--query '{Status:status,Error:error,Cause:cause}'
{
"Type": "Map",
"ItemsPath": "$.items",
"MaxConcurrency": 10,
"Iterator": {
"StartAt": "ProcessItem",
"States": {
"ProcessItem": {
"Type": "Task",
"Resource": "<lambda-arn>",
"End": true
}
}
},
"End": true
}
| Error | Cause | Fix |
|---|---|---|
ExecutionDoesNotExist | Execution ARN is wrong or execution expired | Verify with list-executions; Express execution history is short-lived |
InvalidDefinition | ASL syntax error | Validate JSON; check state names match transitions |
ExecutionAlreadyExists | Duplicate execution name | Use a unique name or omit for auto-generated |
StateMachineDeleting | State machine is being deleted | Wait for deletion to complete |
TaskTimedOut | Activity or callback didn't respond in time | Increase TimeoutSeconds or ensure worker sends heartbeats |
| Execution stuck | Waiting for callback token or activity | Check for pending send-task-success calls |