Designing Human Approval for AI Actions
This lesson explains how to keep people in control of high-impact AI actions with approval workflows, risk-based routing and audit records.
Learning outcomes
After completing this lesson, you will be able to:
- Explain the task token pattern for human approval in Step Functions.
- Design risk-based routing that sends only some AI proposals for review.
- Describe how approval workflows handle timeouts and record accountability.
Approval with AWS Step Functions
Step Functions implements approval with the .waitForTaskToken service integration pattern. The workflow sends the proposed action and a task token to an approval channel, such as an SQS queue read by a review application or an email through SNS, and pauses. A Standard Workflow can wait for up to a year without consuming compute. When the reviewer decides, the application calls SendTaskSuccess or SendTaskFailure with the token, and the workflow continues, retries or escalates. TimeoutSeconds and HeartbeatSeconds handle reviewers who never respond, and a Catch on States.Timeout runs the default path.
Lambda durable functions offer the same pattern in code: the function sends a request with a callback ID and suspends without charges until the approval system completes the callback.
An approval step
Risk-based routing
Reviewing every AI decision is slow and expensive, and reviewers who see too many routine items start approving without reading. A Choice state routes only risky proposals to review, based on thresholds such as value, the model's confidence score, a guardrail intervention or the customer segment, while low-risk proposals complete automatically. Thresholds are adjusted as the system proves itself.
-
Score the proposal
The model or a rule returns the action, its value and a confidence score.
-
Route by risk
A Choice state sends low-risk proposals straight on and the rest to approval.
-
Wait for a decision
A task token step waits, with a timeout and a default rejection.
-
Record and learn
The decision, approver and corrections are stored for audit and evaluation.
The following diagram shows a workflow that routes an agent's actions to a person by risk.

Risk-based review
Accountability and learning
The approval application authenticates reviewers and returns their identity, decision and comments in the task output, so the execution history shows who approved what and when; execution history and logs are retained under the same rules as other audit records. Reviewers' corrections become evaluation data that improve prompts and models, which reduces the share of proposals that need review over time.
AI-proposed refunds
A retailer's support agent proposes refunds. Refunds under 100 dollars should be paid immediately, larger ones need a team lead's approval within 24 hours, and auditors want to know who approved each one.
The agent's refund tool starts a Standard Workflow instead of paying directly. A Choice state pays small refunds at once; larger ones go to an approval step that sends the token to the team leads' review queue with a 24-hour timeout.
If no one responds, the Catch path rejects the refund and notifies the customer that a person will follow up. The review application passes the team lead's identity in SendTaskSuccess, so the execution history is the audit record.
Why is an Express Workflow unsuitable for an approval step that may take two days?
Show answer
Express Workflows run for at most five minutes. Standard Workflows can wait up to a year, and a task token step pauses without consuming compute until the approver responds.
Exam Tips
Remember for the exam
- High-impact AI actions need human approval: Step Functions Standard Workflow with a task token step.
- Approvals may take days: Standard Workflows, not Express (five-minute limit).
- Unanswered approvals: TimeoutSeconds and a Catch on States.Timeout with a default path.
- Review only risky proposals: Choice state on value and confidence thresholds.