Shared Fallback State - JSONata

Fetch failed state name in JSONata StateMachine with shared fallback state for multiple task states

This workflow shows how to fetch failed state names in JSONata StateMachine using a shared fallback state for multiple tasks. Step Functions users want to implement centralized error reporting to avoid duplicating error handling logic. While setting up shared error reporting is simple, a challenge exists: the error reporting task can access error messages but cannot determine which state triggered the error. This creates issues in workflows with many Lambda functions by making it hard to identify failure points. Using JSONata, we show how to overcome this limitation and enable error tracking.

< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/shared-fallback-state-jsonata/cd step-functions-workflows-collection/shared-fallback-state-jsonata

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Sahithi Ginjupalli

Sahithi Ginjupalli

Sahithi Ginjupalli is a Cloud Engineer with a passion for continuous learning and in-depth exploration of her field. She helps optimize client applications through strategic implementation of AWS services, enhancing their efficiency and performance.

Follow on LinkedIn