Lesson 3 of 4 Securing and Governing AI Workloads

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.

Put in order

An approval step

Exam skills 2.5.3 · 1.1.4

Put the steps of a Step Functions human approval in order.

Log in to try this activity Interactive activities are free with an account.

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.

  1. Score the proposal

    The model or a rule returns the action, its value and a confidence score.

  2. Route by risk

    A Choice state sends low-risk proposals straight on and the rest to approval.

  3. Wait for a decision

    A task token step waits, with a timeout and a default rejection.

  4. 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 human approval of an AI agent's actions. The agent's tool starts a Standard Workflow, and a Choice state routes by risk. Low-risk actions run at once. High-risk actions wait for a person's approval through a task token sent to a review queue, with a timeout; an approval runs the action and records who approved it, and a timeout rejects it and notifies the requester.
Only actions above the risk threshold reach a person, which keeps reviewers focused on the decisions that matter.
True or false

Risk-based review

Exam skills 2.5.3

Check principles of human oversight for AI decisions.

Log in to try this activity Interactive activities are free with an account.

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.

Worked example

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.

Check yourself

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.