Activity State Machine

Wait for an activity worker to complete it's task

This application creates a State Machine with Activity state that enables you to implement a worker hosted anywhere. An activity worker can be an application running on EC2 instance/ AWS Lambda or a mobile device application that can make HTTP connection.
The example workflow runs an activity task state which waits for activity worker running on AWS Lambda. When State Machine workflow reaches activity task state, it pauses in In progress status and waits for activity worker to poll for a task. Once the function polls for activity task, the workflow then waits for the time configured in TimeoutSeconds to allow worker complete and report success/failure.

< 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/activity-state-machine-tf/cd step-functions-workflows-collection/activity-state-machine-tf

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: terraform destroy.

Created by:

Ahmad Aboushady

Ahmad Aboushady

Senior Technical Account Manager, AWS