Skip to main content

Overview

As AI agents become integral to workflows—coding assistants, autonomous workflows, MCP servers, and more—organizations need robust governance. Bedrock treats agents as first-class subjects, enabling you to apply the same authorization model to agents that you use for humans.

Why Agent Governance Matters

Principle of Least Privilege

Agents should only access what they need for their specific task

Context-Aware Access

Different scopes may require different agent capabilities

Auditability

Track what agents access and do across your organization

Revocability

Quickly revoke agent access when needed

Agent Subject Types

Bedrock supports multiple subject types for different use cases:

Example: Coding Assistant Agent

Let’s set up a coding assistant with appropriate permissions for a development team.

1. Register the Agent

2. Create Agent-Specific Roles

Define roles tailored for agent capabilities:

3. Define Agent Permissions

Create granular permissions for agent actions:

4. Add Agent to Scope with Restricted Role

You can create the agent with inline membership and role assignment:
Inline Memberships: The memberships array creates the membership and role assignments automatically when the subject is created.

Advanced Patterns

Pattern 1: Scope-Specific Agent Permissions

Different teams may want different agent capabilities:

Pattern 2: Override Agent Permissions at Child Scopes

Restrict agent capabilities in sensitive areas:

Pattern 3: Role-Permission Overrides for Agents

Fine-tune what specific roles can do at specific scopes:

Pattern 4: Multiple Agents with Different Access

MCP Server Integration

When using Model Context Protocol (MCP) servers, Bedrock can govern which tools and resources agents can access:
Your MCP server can then check Bedrock permissions before executing tools.

Checking Agent Permissions

Use the BedrockEngine to evaluate permissions at runtime:

Delegated Permissions (Agent Acting on Behalf of User)

When an agent acts on behalf of a user, an active delegation grant must exist and both must have the permission (the allow is the intersection):

List All Effective Permissions

Agents as Resources: Identity & Ownership

Beyond RBAC and delegation, Bedrock models two first-class agent-governance edges. An agent is a subject; the thing it represents (its runtime, workspace, artifact) is a resource. Subject–Resource Identity — a 1:1 link between a subject and the resource that represents it (create-only). It is for integrity and introspection and is not read on the evaluation path.
Resource Ownershipowns(subject, resource, role). An active ownership row grants the owner-role’s matching permissions on that specific resource, evaluated as its own engine leg (routed through overrides, conditions fail-closed, temporal window via the trusted clock). Use it to give an agent authority over the resources it owns without a broad scope role.
A resource-policy deny still overrides an ownership grant (policies evaluate before the ownership leg). Ownership adds authority; it does not bypass an explicit deny.

Best Practices

Give agents the least privilege needed. It’s easier to grant more access than to revoke it after a problem.
Include model version, capabilities, and purpose in agent metadata for easier auditing.
Create different agent subjects for different purposes rather than one super-agent.
Use scope overrides to limit agent capabilities in production environments.
Log all permission checks and actions for compliance and debugging.
Use external IDs like coding-assistant-v1 to track agent versions.

Comparison: User vs Agent Governance

Next Steps

Multi-tenant Authorization

Isolate agent access across tenants

Scope Overrides

Fine-tune agent permissions at specific scopes