Emit and wait workflow

Implement a callback pattern within your workflow

A single workflow orchestrates a producitonline from start to completion, at various “milestones”, an event is emitted onto a serverless event bus (Event Bridge). The events are produced using the putEvents.waitForTaskToken. This allows the workflow to pause until receiving a resume command with the corresponding task token. Adding a `heartbeat` value to the putEvents task acts as a graceful timeout fallback.

Launch Stack
< 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/emit-and-wait/cd step-functions-workflows-collection/emit-and-wait/

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Benjamin Smith

Benjamin Smith

Ben is a senior developer advocate for Serverless Applications at Amazon Web Services based in London, UK. Prior to joining AWS Ben worked in a number of different technical roles specializing in workflow Automation and web development.

Follow on LinkedIn