Aws step functions

From awslabs/agent-plugins · View interactive version

Aws step functions is an AI agent skill from the GitHub repository awslabs/agent-plugins. Build workflows with AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, state types, variables, data transformation, error handling, AWS service integration, and migrating from the JSONPath to the JSONata query language.

How to use this skill

Skill file

AWS Step Functions

Overview

AWS Step Functions uses Amazon States Language (ASL) to define state machines as JSON. With AWS Step Functions, you can create workflows, also called State machines, to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning pipelines.

This skill provides comprehensive guidance for writing state machines in ASL, covering:

When to Load Reference Files

Load the appropriate reference file based on what the user is working on:

Quick Reference

Standard vs Express Workflows

| | Standard | Express |

| --------------------------------- | ------------------------------------ | ------------------------------------------- |

| Max duration | 1 year | 5 minutes |

| Execution semantics | Exactly-once | At-least-once (async) / At-most-once (sync) |

| Execution history | Retained 90 days, queryable via API | CloudWatch Logs only |

| Max throughput | 2,000 exec/sec | 100,000 exec/sec |

| Pricing model | Per state transition | Per execution count + duration |

| .sync / .waitForTaskToken | Supported | Not supported |

| Best for | Auditable, non-idempotent operations | High-volume, idempotent event processing |

Choose Standard for: payment processing, order fulfillment, compliance workflows, anything that must never execute twice.

Choose Express for: IoT data ingestion, streaming transformations, mobile backends, high-throughput short-lived processing.

Setting the State Machine Query Language

JSONata is the modern, preferred way to reference and transform data in ASL. It replaces the five JSONPath I/O fields (InputPath, Parameters, ResultSelector, ResultPath, OutputPath) with just two: Arguments (inputs) and Output.

Enable at the top level to apply to all states:

{ "QueryLanguage": "JSONata", "StartAt": "...", "States": {...} }

Or per-state to migrate from JSONPath incrementally:

{ "Type": "Task", "QueryLanguage": "JSONata", ... }

JSONPath is still supported and is the default if QueryLanguage is omitted — existing state machines do not need to be migrated.

Best Practices

Troubleshooting

Common Errors

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.