Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds AWS Step Functions state machines in Amazon States Language using JSONata, covering states, error handling, and JSONPath migration.
82% 95%+14 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
3 of 3 safety checks passed
Not used yet
Some AWS operations and user-defined tasks are asynchronous. The states pattern is: Start Task → initial wait (what is the expected time it takes to complete the task?) → call describe/status API → check result → short wait → loop back.
See examples/polling-loop-wait-check-choice.asl.json
Step Functions has no built-in rollback. The saga pattern chains compensating actions in reverse order. Each forward step has a Catch that records which step failed, then routes to the appropriate compensation entry point.
See examples/compensation-saga-pattern.asl.json
Compensation chain: ReserveInventory fails → OrderFailed. ChargePayment fails → ReleaseInventory → OrderFailed. ShipOrder fails → RefundPayment → ReleaseInventory → OrderFailed. Each Catch records $failedStep and $errorInfo. Compensation states use variables from forward steps ($chargeId, $reservedQty) to know what to undo.
Map and Parallel states can be nested in any order to create multiple layers. The key constraint is understanding variable scope and data flow at each nesting boundary.
See examples/nested-map-parallel-structures.asl.json
See processing-state-inputs-and-outputs.md for details about variable scopes
When calling unreliable external APIs per-item, use ToleratedFailurePercentage on a Map to continue with whatever succeeded, then post-process the results to separate successes from failures. Failed iterations return objects with Error and Cause fields.
See examples/scatter-gather-with-partial-results.asl.json
Key elements:
ToleratedFailurePercentage: 100 lets the Map complete even if every item fails. Lower the threshold to bail out early.$exists(Error) to separate failed from successful iterations.$type/$exists/[] pattern — JSONata returns a single object (not a 1-element array) when exactly one item matches, and undefined when nothing matches.Next to this one in the catalogue, plus more from the same author.