Step Functions Workflow
intermediateExpress Step Functions workflow with validate → process → notify steps, error handling with Catch/Retry, Choice branching, and an API Gateway trigger endpoint. CloudWatch failure alarm included.
Quick Start
Via CLI (recommended)
npx cdk-starter create Then select "Step Functions Workflow" from the prompt
Or scaffold directly
npx cdk-starter create --starter step-functions-workflow README
Step Functions Workflow
Express Step Functions workflow with validate → process → notify steps, error handling with Catch/Retry blocks, Choice branching for dry-run mode, and an API Gateway trigger.
Start a workflow
curl -XPOST <ApiUrl>/execute \
-H 'Content-Type: application/json' \
-d '{"input": "data", "dryRun": false}'
Step files
| Step | File |
|---|---|
| Validate | src/steps/validate.ts |
| Process | src/steps/process.ts |
| Notify | src/steps/notify.ts |
| On Error | src/steps/on-error.ts |
Prerequisites
- Node.js ≥ 20
- AWS CLI configured (
aws configure) - CDK bootstrapped (
npx cdk bootstrap)
Deploy
npm install
npx cdk diff
npx cdk deploy
Tear down
npx cdk destroy