Skip to main content

Overview

AI agents—LLM-powered assistants, autonomous workflows, MCP servers—need to perform actions within user permission contexts. This guide covers patterns for implementing agent delegation in Bedrock.

Setting Up Agent Delegation

1. Create the Agent Subject

2. Add Agent to Scope

3. Assign Agent Role

4. Create a Delegation Grant

Delegation requires an active grant authorizing the agent to act for the user in the scope—without it the engine denies with NO_DELEGATION_GRANT:

5. Evaluate with Delegation

Common Patterns

Pattern 1: Read-Only Agent

Agent can read anything the user can read, but cannot write:

Pattern 2: Scoped Agent Access

Agent only has access in specific scopes:

Pattern 3: Capability-Based Permissions

Different agents have different capabilities:

Pattern 4: Override Agent Permissions in Sensitive Areas

Pattern 5: Time-Limited Agent Access

Use conditional permissions for time-based restrictions:

MCP Server Integration

For Model Context Protocol (MCP) servers:

Audit Logging

Always log delegation details:

Security Considerations

Give agents the minimum permissions needed. They can never exceed user permissions, but should be further restricted.
Don’t reuse user roles for agents. Create dedicated agent roles with appropriate restrictions.
Limit agent memberships to necessary scopes. Don’t add agents to production if they only need development access.
Use scope overrides to disable agent access in compliance, PII, or other sensitive areas.
Log all agent actions with both actor and principal for complete audit trails.
Periodically audit agent roles and permissions to ensure they’re still appropriate.

Next Steps

Agent Governance Guide

Complete guide to managing AI agents

Scope Overrides

Fine-tune agent permissions with overrides