ExitAWS Step Functions: asynchronous task coordination1 / 9
Explanation

Choose what completion means

How service integration patterns coordinate long-running processing and task-token callbacks, including secure resumption, heartbeats, and human clarification or approval. · advanced

A service accepting a request is not the same as finishing its work. With request-response, a Task advances when the integrated API call returns. For an asynchronous job-submission API, that response normally means submission succeeded, not that processing finished.

For supported integrations, .sync makes Step Functions track a submitted job until completion. For example, arn:aws:states:::batch:submitJob.sync submits an AWS Batch job using a job definition and job queue, then waits for its outcome. The execution role needs submission and monitoring permissions; stopping the workflow only triggers best-effort cancellation of the underlying job.

With .waitForTaskToken, completion instead requires an explicit callback carrying the task token. This suits custom workers and human clarification or approval, where the submission response cannot describe the final outcome. Both .sync and task-token callbacks require Standard Workflows; Express Workflows support request-response integrations, not these waiting patterns.

PatternTask completes whenCompletion owner
Request-responseAPI call returnsIntegrated API
.syncTracked job finishesService integration
.waitForTaskTokenToken callback succeedsCallback application

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.