Securing AI Agent Memory with Fine-Grained Access Control in Amazon Bedrock AgentCore
Explore how Amazon Bedrock AgentCore Memory’s new Fine-Grained Access Control (FGAC) enables secure per-user and per-tenant memory isolation using AgentCore Gateway, OAuth/JWT authentication, and Cedar policies—without building custom authorization logic into your agent application.
AI agents become significantly more useful when they can remember.
They can remember user preferences, previous interactions, workflow context, and other information that helps them provide personalized experiences. But once an agent has persistent memory, an important security question appears:
Who is allowed to access that memory?
This becomes especially important in multi-user and multi-tenant applications. If Alice and Bob use the same AI assistant, Alice should never be able to retrieve Bob's memories, even though both users may be interacting with the same underlying agent infrastructure.
Amazon Bedrock AgentCore Memory now supports fine-grained access control (FGAC), providing a way to enforce these boundaries through AgentCore Gateway using authenticated identities and Cedar policies.
The Problem with Shared Agent Memory
Consider an enterprise AI assistant used by multiple employees.
Alice tells the assistant:
«I prefer Python for backend development.»
Bob tells the assistant:
«I prefer Rust for backend development.»
The assistant should remember these preferences independently.
Alice should receive:
«Your preferred language is Python.»
While Bob should receive:
«Your preferred language is Rust.»
The problem becomes even more important in a multi-tenant SaaS application.
A simplified model could look like this:
Tenant A ├── Alice ├── Bob └── Tenant A memory
Tenant B ├── Charlie ├── David └── Tenant B memory
A user from Tenant A should not be able to access information belonging to Tenant B.
Traditionally, developers could implement these checks inside application code. But as an agent architecture grows, authorization logic can become distributed across APIs, services, tools, and agent workflows.
This is where fine-grained access control becomes valuable.
How AgentCore Memory FGAC Works
With FGAC, an AgentCore Memory resource can be fronted by an AgentCore Gateway configured with OAuth-based JWT authentication.
The authenticated caller's identity can then be evaluated using Cedar policies before Memory operations are allowed.
A simplified architecture looks like this:
User
│
│ JWT
▼
AgentCore Gateway
│
├── OAuth / JWT authentication
│
└── Cedar authorization
│
▼
Memory Connector
│
▼
AgentCore Memory
The important architectural change is that authorization does not have to be implemented entirely inside the agent application.
The Gateway can authenticate the caller and evaluate authorization policies before the request reaches Memory.
Where Cedar Fits
Cedar provides the policy layer for authorization.
A useful way to understand an authorization decision is through three concepts:
Principal
Who is making the request?
Action
What operation are they attempting?
Resource
What data are they trying to access?
For example:
Principal: Alice
Action: Read Memory
Resource: Alice's memory
This request can be permitted.
But:
Principal: Alice
Action: Read Memory
Resource: Bob's memory
can be denied.
Policies can also use attributes from the authenticated identity, such as user or tenant information, to enforce namespace and tenant boundaries.
Per-User and Per-Tenant Isolation
This is where FGAC becomes particularly useful for multi-tenant applications.
Imagine a JWT containing claims such as:
user_id = alice
tenant_id = tenant-a
A Cedar policy can use these attributes when evaluating whether a requested Memory operation is permitted.
Conceptually:
JWT
│
├── user_id
│
└── tenant_id
│
▼
Cedar Policy
│
├── User authorization
│
└── Tenant authorization
│
▼
Memory Operation
This allows architectures such as:
- Alice → Alice's memory
- Bob → Bob's memory
- Tenant A → Tenant A memory
- Tenant B → Tenant B memory
The exact policy design depends on how the application's identity and tenancy model are structured.
The AgentCore Memory Connector
The AgentCore Memory connector is an important component in this architecture.
It connects an AgentCore Gateway target to the Memory data plane and exposes Memory operations as Cedar actions.
According to AWS, the connector exposes 12 Memory operations as Cedar actions, with request attributes available for policy conditions.
This means authorization can be more granular than simply asking:
«Can this user access Memory?»
Instead, the system can evaluate:
«Can this authenticated user perform this specific Memory operation against this specific resource?»
That distinction matters when designing production-grade agent systems.
Why Infrastructure-Level Authorization Matters
There is an important difference between telling an AI agent not to access something and actually preventing the operation.
For example, giving an agent an instruction such as:
«Never reveal Bob's memory to Alice.»
is not a sufficient security boundary.
That is an instruction to the model.
A stronger architecture is:
User
│
▼
Authentication
│
▼
Authorization
│
▼
Memory
The agent can reason about what it wants to do, but the infrastructure determines whether the requested operation is permitted.
This creates a clear separation of responsibilities:
- Agent: Reasoning and orchestration
- Gateway: Authentication and authorization
- Cedar: Access-control policies
- Memory: Persistent agent context
Combining AgentCore with Strands Agents
This model also fits naturally with agent frameworks such as Strands Agents.
A production-oriented architecture could look like this:
User
│
▼
Authentication
│
▼
AgentCore Gateway
│ │
│ └── Cedar Policies
│
▼
Strands Agent
│
┌─────┴─────┐
│ │
Tools Memory
│
▼
AgentCore Memory
Strands can focus on agent reasoning, tool orchestration, and workflow execution, while AgentCore provides managed infrastructure around the agent.
This creates a clean separation:
The agent decides what it wants to do.
The authorization layer decides what it is allowed to do.
A Simple Multi-Tenant Example
Consider an enterprise assistant with two users:
Alice → tenant-a
Bob → tenant-a
Alice stores:
«I prefer Python.»
Bob stores:
«I prefer Rust.»
When Alice asks:
«What programming language do I prefer?»
The agent should retrieve Alice's permitted memory.
Now imagine Alice attempts to access Bob's memory.
The request reaches the Gateway, where the authenticated identity and requested Memory operation are evaluated against the Cedar policy.
If the request violates the policy:
Request
↓
AgentCore Gateway
↓
Cedar Policy
↓
DENY
The Memory operation is rejected rather than relying on the agent application to make the authorization decision.
That is the important security boundary.
Why This Matters for Agentic AI
As AI agents evolve, persistent memory will become an increasingly important part of agent architecture.
But persistent memory also means persistent data.
That introduces requirements around:
- Identity
- Authorization
- Tenant isolation
- Data boundaries
- Operation-level permissions
- Secure access to long-term context
Fine-grained access control for AgentCore Memory provides a way to address these requirements without making every agent responsible for implementing its own authorization model.
This can be useful for:
- Personal AI assistants
- Enterprise copilots
- Customer-support agents
- Multi-tenant SaaS platforms
- Long-running autonomous workflows
Final Thoughts
Agent memory is powerful because it gives an AI system continuity.
But the more an agent remembers, the more important it becomes to control whose information it can remember and retrieve.
The key idea behind AgentCore Memory FGAC is simple:
«Memory should be personalized, but access to that memory should be enforced by identity and policy.»
With AgentCore Gateway, OAuth/JWT authentication, Cedar policies, and the Memory connector, authorization can become an explicit infrastructure boundary around agent memory.
The most interesting part is not simply that agents can now remember users better.
It is that we can start designing agent systems where reasoning, memory, identity, and authorization are separate architectural concerns.
That separation is an important step toward building AI agents that are not only intelligent, but also secure and suitable for multi-user environments.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article