What is a Subject?
A subject is any entity that can be granted permissions in Bedrock. This includes humans, AI agents, services, and system processes. Bedrock’s unified subject model means you manage all of these with the same APIs and concepts.Subject Properties
Subject Types
User
Human users authenticated through your identity provider.Agent
AI agents, LLM-powered assistants, or autonomous workflows.Service
Backend services, APIs, or microservices that need to perform authorized actions.API Key
A machine credential acting as its own principal—used when an API key authenticates directly (see authentication) rather than on behalf of a user.For internal jobs, cron tasks, or platform operations, model them as a
service subject.Memberships
A membership connects a subject to a scope. Without a membership, a subject has no access to a scope.Membership Properties
A membership alone doesn’t grant permissions—you must also assign roles to the membership.
Role Assignments
After creating a membership, assign roles to grant permissions:Complete Example: Adding a User
permissionMode—by default, override, it does not.)
Complete Example: Adding an AI Agent
External IDs
UseexternalId to map Bedrock subjects to your existing user/service identifiers:
- Sync users from your identity provider
- Reference subjects by your system’s IDs
- Avoid storing Bedrock IDs in your application
Subject Metadata
Store custom data on subjects for use in conditional permissions:condition):
Multiple Memberships
A subject can belong to multiple scopes with different roles:API Reference
Create Subject
Create a new subject
Create Membership
Add a subject to a scope
Create Role Assignment
Assign a role to a membership
Get by External ID
Look up subjects by external ID
Next Steps
Roles
Learn how roles bundle permissions together