Skip to main content

What is Delegation?

Delegation allows one subject (the actor) to perform actions on behalf of another subject (the principal). This is essential for AI agents, service accounts, and automated workflows that need to act within a user’s permission context.

On Behalf Of

How actor/principal evaluation works

Agent Delegation

AI agents acting for users

Why Delegation Matters

As AI agents become integral to workflows, you need to answer:
  • What can this agent access? — Agents need scoped permissions
  • Whose permissions apply? — The agent’s, the user’s, or both?
  • How do I audit agent actions? — Track both actor and principal
  • How do I limit agent scope? — Agents shouldn’t exceed user permissions
Bedrock’s delegation model addresses all of these.

The Delegation Model

Delegation is gated: an active delegation grant authorizing the actor to act for the principal in the scope must exist first, or the request is denied with NO_DELEGATION_GRANT before any permission is checked.

Basic Example

Key Concepts

Actor

The entity actually performing the action. This is typically:
  • An AI agent
  • A service account
  • An automated workflow
  • An API integration

Principal (onBehalfOf)

The entity whose permissions should also be checked. This is typically:
  • The human user who initiated the request
  • The user who owns the session
  • The user who authorized the agent

Dual Authorization

When onBehalfOf is provided, both the actor and principal must have the permission: The allow is the intersection of the two—neither the actor nor the principal can exceed the other. (An active delegation grant must also exist; see the note above.)

Use Cases

AI Coding Assistant

Automated Workflow

API Integration

Audit Trail

The decision includes both actor and principal for auditing:

Without Delegation

If onBehalfOf is not provided, only the actor’s permissions are checked:

Next Steps

On Behalf Of

Deep dive into actor/principal evaluation

Agent Delegation

Patterns for AI agent delegation