Skill 2.5.3

Design human oversight workflows that include approval mechanisms for AI operations (for example, by using AWS Step Functions).

Key Concepts

AWS Step Functions implements the pattern with the .waitForTaskToken integration: the workflow sends the proposed action and a task token to an approval channel (an SQS queue, an email through SNS, or a review application), then pauses, for up to a year in a Standard Workflow, without consuming compute. The approver's decision calls SendTaskSuccess or SendTaskFailure with the token, and the workflow continues, retries or escalates. A timeout and a default action handle approvers who never respond.

Approval is risk-based: low-risk actions run automatically, while actions above a threshold (value, confidence score, guardrail flag) route to review. Lambda durable functions offer the same callback pattern in code. The workflow records who approved what and when, giving an audit trail, and reviewers' corrections feed evaluation data sets to improve prompts and models.