

# Security and IAM roles for Claude Managed Agents

A session involves three identities: the caller that sends API requests, the session role that the service assumes, and the identity the tool runner runs as. Use a separate role for each, and give each only what it needs. [Set up permissions and prerequisites](claude-managed-agents-bedrock-account-setup.md) creates all of them.


| Identity | What it is for | 
| --- | --- | 
| Caller | Signs your application's API requests. Needs the API actions. Setting an agent's role, or naming it again when you create a session, requires `iam:PassRole`. A session that inherits the agent's role does not. | 
| Session role | The service assumes it to call the model, to call AgentCore Gateways, and to start and stop the session's container on your AgentCore Runtime. When you create a session with S3 folders or files, the service also assumes it to read the runtime's platform version. | 
| Tool runner role | On AgentCore, the role the tool runner's container runs as, and the role it uses to reach a session's S3 folders and files. Self-hosted, a role that may only connect, which the tool runner signs its connection with. | 

## Sign requests
<a name="claude-managed-agents-bedrock-security-sign-requests"></a>

Sign every request with AWS Signature Version 4, with the service name `bedrock` and your endpoint's Region. With temporary credentials, include the session token as `x-amz-security-token`. You don't need an Anthropic API key.

Only IAM role credentials can call the API. Requests signed with IAM user or root user credentials return HTTP 403, because the service records every agent, session, and event as created by a role.

**Note**  
Using your users' JSON Web Tokens (JWTs) from your identity provider, so that a session acts on behalf of an end user, is available only in a private preview. To request access, contact [AWS Support](https://console.aws.amazon.com/support/home) or your AWS account team.

## The session role
<a name="claude-managed-agents-bedrock-security-the-session-role"></a>

The agent's session role must be in the same account as the caller. Set one role, as `execution_identity`, when you create the agent (CreateAgent). A session runs as that role unless its create request names another role in the account in `execution_identity` or the `x-amz-role-arn` header, which requires `iam:PassRole` on that role. The role cannot change after the session is created. UpdateSession refuses a role in the body or the header, and there is no IAM default role for sessions. An administrator can set a new role on the agent with UpdateAgent, which requires `iam:PassRole` on that role. The new role applies to future sessions, and existing sessions keep the role they started with. An agent's role cannot be cleared.

Its trust policy names Amazon Bedrock's service principal and holds `aws:SourceAccount` and `aws:SourceArn`, so that the service can assume your role only for sessions in your own account. The full policy is in [Set it up in the console, Step 1](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-1-create-the-session-role).

Every session role, including any you name on a session, must carry the tag `ManagedAgentsExecutionRole` with the value `enabled`. The service assumes only roles that have it, so it cannot use your other roles that trust Amazon Bedrock's service principal, such as roles for Amazon Bedrock Agents or knowledge bases. Allow `iam:TagRole` and `iam:UntagRole` only to principals you trust to choose which roles the service may use.


| Permission | Why | 
| --- | --- | 
| `bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream` on the inference profiles, the `anthropic.*` foundation models, and the projects whose sessions use the role (`project/*` for all of them) | The model calls. The service uses cross-Region inference profiles, so the foundation model statement names every Region. Amazon Bedrock also checks each model call against the session's project. See [Projects](#claude-managed-agents-bedrock-security-projects). | 
| `bedrock-agentcore:InvokeAgentRuntime`, `bedrock-agentcore:StopRuntimeSession` on your runtime and its endpoints | Starting and stopping each session's container. Not needed for self-hosted sessions. | 
| `bedrock-agentcore:InvokeGateway` on a gateway | Only if your agents use that gateway's tools. | 
| `bedrock-agentcore:GetAgentRuntime` on your runtime | Only for sessions with S3 folders or files. When you create such a session, the service reads the runtime's platform version, with a credential that can do nothing else, and refuses the session if the runtime is on V1. Each read is a `GetAgentRuntime` event in your CloudTrail. Without this permission, you see an `AccessDenied` at most about once per runtime and role every five minutes while such sessions are created, and a session on a V1 runtime is created but fails every time its container starts. | 

An agent takes one role, as `execution_identity`. A session runs as that role by default. An IAM CreateSession can name another role in the account instead, with `iam:PassRole` on it.

## The caller's permissions
<a name="claude-managed-agents-bedrock-security-the-caller-s-permissions"></a>

Every route has its own IAM action, named `bedrock:<Verb>Anthropic<Noun>`, except the shared Amazon Bedrock tagging actions (see [Resource tags](#claude-managed-agents-bedrock-security-resource-tags)). `bedrock:*Anthropic*` grants the Claude Managed Agents actions and any other current or future Amazon Bedrock action whose name contains `Anthropic`. That includes `bedrock:CreateAnthropicSessionConnection`, the tool runner's action, which is why the caller policy in [Set it up in the console, Step 5](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-5-give-your-applications-permission-to-call-the-api), denies it. Verb wildcards such as `bedrock:Get*`, `bedrock:List*`, and `bedrock:Create*` also grant the matching Claude Managed Agents actions. Grant the wildcard only to roles you trust with all of them, and use explicit actions when a policy must limit access to Claude Managed Agents.


| Area | Actions | Resource | 
| --- | --- | --- | 
| Agents | `CreateAnthropicAgent` | The new agent's ARN prefix (`…/anthropic-agent/*`), the model's inference profile ARN, each AgentCore Gateway in `mcp_servers`, each S3 folder of an `s3_mount` skill, and each agent the `multiagent` list calls | 
| Agents | `UpdateAnthropicAgent` | The agent, and the inference profile, gateways, S3 skill folders, and called agents that the update sets | 
| Agents | `ListAnthropicAgents` | The project | 
| Agents | `GetAnthropicAgent`, `ArchiveAnthropicAgent`, `ListAnthropicAgentVersions` | The agent | 
| Sessions | `CreateAnthropicSession` | The new session's ARN prefix (`…/anthropic-session/*`), the primary agent and the agents it calls directly, attached memory stores, the parent AgentCore Runtime ARN (also for named endpoints) or the exact self-hosted ARN, and, for overrides, the model's inference profile (which carries the primary agent's tags), each AgentCore Gateway in `mcp_servers`, each S3 folder of an `s3_mount` skill, and each S3 folder or object in the request's own `s3_mount` and `s3_object` `resources` entries | 
| Sessions | `ListAnthropicSessions` | The project | 
| Sessions | `GetAnthropicSession`, `DeleteAnthropicSession`, `ArchiveAnthropicSession` | The session | 
| Sessions | `UpdateAnthropicSession` | The session and the agent it was created from, on every update, and each AgentCore Gateway that an `mcp_servers` patch sets. `agent_id` is not a request attribute. | 
| Events | `GetAnthropicSessionEvents`, `SendAnthropicSessionEvents`, `GetAnthropicSessionEventsWithResponseStream` | The session | 
| Threads | `GetAnthropicSessionThreads`, `GetAnthropicSessionThread`, `ArchiveAnthropicSessionThread`, `GetAnthropicSessionThreadEvents`, `GetAnthropicSessionThreadEventsWithResponseStream` | The session | 
| Memory stores | `CreateAnthropicMemoryStore` | Any memory store in the project: `<project ARN>/anthropic-memory-store/*` | 
| Memory stores | `ListAnthropicMemoryStores` | The project | 
| Memory stores | `GetAnthropicMemoryStore`, `UpdateAnthropicMemoryStore`, `ArchiveAnthropicMemoryStore`, `DeleteAnthropicMemoryStore` | The memory store | 
| Memories | `GetAnthropicMemories`, `GetAnthropicMemory`, `GetAnthropicMemoryVersions`, `GetAnthropicMemoryVersion` | The memory store | 
| Memories | `CreateAnthropicMemory`, `UpdateAnthropicMemory`, `DeleteAnthropicMemory`, `RedactAnthropicMemoryVersion` | The memory store | 
| Tool runner | `CreateAnthropicSessionAttachment`, for a self-hosted tool runner's activation | The session | 
| Tool runner | `CreateAnthropicSessionConnection`, for the tool runner's connection to the service. Grant it to the tool runner's role only. | The session | 
| Projects | `PutAnthropicEncryptionConfiguration`, `GetAnthropicEncryptionConfiguration` | The project's encryption configuration: `<project ARN>/anthropic-encryption-configuration/default` | 

Resource ARNs nest under the project:


| Resource | ARN | 
| --- | --- | 
| Project | `arn:aws:bedrock:<region>:<account>:project/<project id>` | 
| Agent | `<project ARN>/anthropic-agent/<agent id>` | 
| Session | `<project ARN>/anthropic-session/<session id>` | 
| Memory store | `<project ARN>/anthropic-memory-store/<memory store id>` | 
| Self-hosted environment | `<project ARN>/anthropic-self-hosted` | 
| Encryption configuration | `<project ARN>/anthropic-encryption-configuration/default` | 

So a policy can grant one project's sessions with `.../project/prod/anthropic-session/*`, and can let an observer stream a session's events without letting it send any. A memory has no ARN of its own, so the memory actions name its store.

Creating an agent, a memory store, or an IAM session is checked against the ARN of the resource being created, with `*` for its unknown ID, such as `.../project/prod/anthropic-agent/*`. A policy that names only `.../project/prod` does not allow the create. A `Deny` that names only the project ARN does not refuse it. Use `.../project/prod/*` or the type's prefix.

Creating a session that attaches a memory store requires `bedrock:CreateAnthropicSession` on that store. The condition key `bedrock:AnthropicMemoryStoreAccess` is evaluated separately for each attachment, with the value `ReadOnly` or `ReadWrite`. The API's `access` values are still `read_only` and `read_write`, and an absent or null `access` maps to `ReadWrite`. Use this condition key to restrict a caller to read-only attachments. Numeric `access` values are refused on IAM creates. The memory actions above govern direct API calls to memories.

For AgentCore, grant `bedrock:CreateAnthropicSession` on the runtime ARN, including when `environment_id` selects a named endpoint of that runtime. The service keeps the endpoint you select for invocation, but the caller's CreateSession permission controls the runtime as a whole. For self-hosted, grant the action on `<project ARN>/anthropic-self-hosted`. The new session's ARN prefix and the participating agents also need grants, and all required resources must be allowed before a session is created. Move CreateSession allows and denies that name an endpoint to the parent runtime ARN. An allow on only an endpoint does not grant access to the runtime, and a deny on one endpoint does not restrict endpoint selection when the runtime is allowed.

An IAM agent create must name a role. Creating the agent needs `iam:PassRole` on that role, with `iam:PassedToService` set to `bedrock.amazonaws.com` and the agent's ARN as `iam:AssociatedResourceArn`. A caller without it gets 403 before anything is written to the agent. An agent update that sets the role checks `iam:PassRole` the same way. Creating an IAM session that names a role, the agent's or another, needs `iam:PassRole` on that role, with the new session's ARN as `iam:AssociatedResourceArn`. A session that inherits the agent's role, and a session update, do not need `iam:PassRole`.

### Limit session overrides
<a name="claude-managed-agents-bedrock-security-limit-session-overrides"></a>

A session create or update that changes its copy of the agent is checked on the agent's ARN with these Bool condition keys. Each key is `true` when the request sets the field, even to `null` or an empty list, and `false` when the request leaves the field out.


| Condition key | Field | Sent on | 
| --- | --- | --- | 
| `bedrock:AnthropicAgentsOverrideModel` | `model` | `CreateAnthropicSession` | 
| `bedrock:AnthropicAgentsOverrideSystem` | `system` | `CreateAnthropicSession` | 
| `bedrock:AnthropicAgentsOverrideSkills` | `skills` | `CreateAnthropicSession`, and `UpdateAnthropicSession`, where it is always `false` | 
| `bedrock:AnthropicAgentsOverrideTools` | `tools` | `CreateAnthropicSession` and `UpdateAnthropicSession` | 
| `bedrock:AnthropicAgentsOverrideMcpServers` | `mcp_servers` | `CreateAnthropicSession` and `UpdateAnthropicSession` | 

This statement refuses sessions of one agent that override its tools, and allows its other sessions:

```json
{
  "Effect": "Deny",
  "Action": ["bedrock:CreateAnthropicSession", "bedrock:UpdateAnthropicSession"],
  "Resource": "arn:aws:bedrock:us-west-2:111122223333:project/default/anthropic-agent/agent_...",
  "Condition": { "Bool": { "bedrock:AnthropicAgentsOverrideTools": "true" } }
}
```

Use one `Deny` for each field you forbid. A statement with several keys in its condition matches only when all of them match. A session can also pin an older version of its agent, which can bring other tools or skills without setting any of these fields.

The action names are those of the preview and can change before general availability.

## Projects
<a name="claude-managed-agents-bedrock-security-projects"></a>

Every agent and session belongs to one Amazon Bedrock project. A request names it in the `anthropic-workspace-id` header, as a project ID or a project ARN, and goes to the `default` project without it. A resource is only found in its own project, so the same ID in another project's request is a 404. Use projects with IAM to keep teams or environments apart.

A session's model calls name its project, and Amazon Bedrock authorizes each call as the session role on that project's ARN. So the session role decides which projects' sessions can call the model. `project/*` allows every project in the account and Region. A list of project ARNs allows only those projects. Keep `project/default` in the list. Every turn of a session whose role doesn't allow its project fails with `model_request_failed_error`.

A project does not keep AgentCore Runtimes apart. A runtime belongs to your account, not to a project, so a session in any project can use any runtime in the account and Region that both its caller and its session role are allowed to use. The caller needs `bedrock:CreateAnthropicSession` on the runtime's ARN, also when the session names one of its endpoints. The session role needs `bedrock-agentcore:InvokeAgentRuntime` and `bedrock-agentcore:StopRuntimeSession` on the runtime and its endpoints. The caller policy in [Set it up in the console, Step 5](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-5-give-your-applications-permission-to-call-the-api), grants `runtime/*`, so where the session role can also invoke every runtime, a caller in one project can start sessions on another project's runtime.

To keep each project's runtimes to itself:
+ Give each project its own session role, whose policy names only that project's runtimes and their endpoints.
+ Create each project's agents with that project's session role. A session that names no role runs as its agent's role without an `iam:PassRole` check.
+ Give each project's callers a policy that names only that project, its runtimes, and its session role, in place of the caller policy's `project/*`, `runtime/*`, and `iam:PassRole` statements. Adding a narrower policy does not take away what the broader one allows.

A self-hosted environment already belongs to its project, so a session can use only its own project's.

## Resource tags
<a name="claude-managed-agents-bedrock-security-resource-tags"></a>

Agents, memory stores, and sessions take AWS tags where tagging is turned on. There, a resource's tags decide IAM for the actions on it, as `aws:ResourceTag/<key>`, and a create request's tags are `aws:RequestTag/<key>` and `aws:TagKeys`.

Set a resource's tags when you create it, with a top-level `"tags": {"team": "blue"}` in `POST /agents`, `POST /memory_stores`, or `POST /sessions`. Or set them later with its tag routes, where `<type>` is `agents`, `memory_stores`, or `sessions`:


| Request | IAM action | 
| --- | --- | 
| `POST /<type>/{id}/tags` with `{"tags": {"team": "blue"}}` | `bedrock:TagResource` | 
| `POST /<type>/{id}/untag` with `{"tag_keys": ["team"]}` | `bedrock:UntagResource` | 
| `GET /<type>/{id}/tags` | `bedrock:ListTagsForResource` | 

A create that sets tags is also checked for `bedrock:TagResource` on the new resource. These are Amazon Bedrock's shared tagging actions. `bedrock:*Anthropic*` does not grant them, and a statement on `"Resource": "*"` grants them on every Amazon Bedrock resource, so name the three ARN prefixes: `.../project/*/anthropic-agent/*`, `.../project/*/anthropic-memory-store/*`, and `.../project/*/anthropic-session/*`.

Before you rely on tags to keep a principal away from a resource, check what they decide:
+ **A session's tags are its own.** A session does not take its agent's tags. It holds a copy of its agent's configuration, including the system prompt and tools, which `GetAnthropicSession` returns. Reading a session, its events, and its threads, and sending it events, are decided on the session's tags alone. Updating a session also checks its agent. So a `Deny` keyed on an agent's tag stops new sessions from that agent, but not reads of a session already created from it. Tag each session as you tag the agent you create it from. IAM cannot compare a session's tags with its agent's, so the roles that create sessions decide them.
+ **For a session, a memory store's tags decide only when the session is created.** They do not decide what the session's agent reads or writes in the store after that. Your own calls to the store's memory API are decided on its tags, as on any resource.
+ **AgentCore Runtime tags are not read.** Creating a session checks the runtime as if it had no tags. A `Deny` keyed on a runtime's tag does not stop a session on that runtime, and an `Allow` keyed on one refuses it. Name the runtime's ARN instead.
+ **A tool runner's connection is decided when it connects,** on its session's tags. A tag change does not close a connection that is already open.
+ **Tag changes are not immediate.** A change to a resource's tags can take up to 15 minutes to take effect in IAM, and so can a new resource's tags. Until then, a request can be decided on the resource's earlier tags or, just after it is created, on no tags. Where a `Deny` must hold at once, name the principal or the resource's ARN rather than a tag.
+ **Lists are not filtered.** `ListAnthropicAgents`, `ListAnthropicMemoryStores`, and `ListAnthropicSessions` are checked on the project and list every resource in it, without its content or tags. Deny the list action too where a list must not show a resource.
+ **Do not rely on a project's tags in this preview.** In some Regions a project cannot be tagged, and it is then decided as having no tags.

These policies are easy to get wrong:
+ **Deny the tagging actions with the actions you protect.** A caller who can untag a resource can remove the tag a `Deny` is keyed on, and one who can tag it can add the tag an `Allow` needs. Name `bedrock:TagResource` and `bedrock:UntagResource` in each `Deny` keyed on `aws:ResourceTag/<key>`, and condition each grant of `bedrock:TagResource` on the tags it may set, with `aws:RequestTag/<key>` and `aws:TagKeys`.
+ **Put a request-tag condition on** **`CreateAnthropicSession`** **in a statement on the session's ARN.** A session create is checked on the new session's ARN, each of its agents, each memory store, its environment, and a model override's inference profile, and only the session's check carries the request's tags. On `"Resource": "*"`, an `Allow` that requires a request tag does not match the checks on the agents, memory stores, or environment, so on its own it allows no session create. A `Deny` that requires one matches them and refuses every session create, tagged or not. This `Deny` refuses session creates that do not set `team`:

```json
{
  "Effect": "Deny",
  "Action": "bedrock:CreateAnthropicSession",
  "Resource": "arn:aws:bedrock:us-west-2:111122223333:project/*/anthropic-session/*",
  "Condition": { "Null": { "aws:RequestTag/team": "true" } }
}
```

An agent create works the same way. It is checked on the new agent's ARN, its model's inference profile, each gateway, and each agent its `multiagent` list calls, and only the agent's check carries the request's tags. Put a request-tag condition on `CreateAnthropicAgent` in a statement on `.../project/*/anthropic-agent/*`.
+ **Tag keys that differ only by case are one key to IAM,** such as `team` and `Team`. A create or a tag change whose tags name two such keys returns 400 `invalid_request_error`, and so does a tag change that adds a key the resource already has in another case. A resource that already holds both keeps both until one is removed, and until then a `Deny` keyed on either can miss it. The same is true of a resource that gets both from two tag changes, each adding one case, at the same moment.

## Shared responsibility
<a name="claude-managed-agents-bedrock-security-shared-responsibility"></a>

**Important**  
**No per-user isolation in this preview.** Access is decided by IAM roles and projects, not by individual users. Anyone who can call the API with permissions on a project can see, use, change, and delete every agent, session, and memory store in it, including sessions that someone else created. Put people and applications in the same project only if they may fully access each other's agents and sessions.

**What AWS secures**
+ The API and the agent loop, which run in Amazon Bedrock.
+ The session data the service keeps, and the separation between accounts. Within a project there is no separation between users.
+ Access to your account, which the service gets only through the session role you create and pass and, if you set a customer managed key, through the key role and your callers' AWS KMS permissions (see [Encryption at rest](claude-managed-agents-bedrock-encryption.md)).

**What you own**
+ **Your environment's image and host:** what is installed, the user the tool runner runs as, and, for self-hosted, the machine's hardening.
+ **The credentials the tool runner can reach:** the tool runner role's permissions, or whatever the self-hosted tool runner's user can read.
+ **Network egress** from your environment.
+ **Your IAM roles and policies:** the caller, the session role, and the tool runner's role.
+ **The data your tools write,** to your environment or to other systems, and deleting it.
+ **Tool approval:** permission policies, and checks in the tools that change other systems.

## Protect the tool runner
<a name="claude-managed-agents-bedrock-security-protect-the-tool-runner"></a>

The tool runner runs every command the model asks for as its own user, with no sandbox around the command, so the command can use whatever that user can reach. Treat everything the tool runner can reach as reachable by the model, and by anyone whose text reaches the model: a document, a web page, a repository, or a tool result.
+ **Grant** **`bedrock-agentcore:InvokeAgentRuntime`** **on a session's runtime and its endpoints to the session role only.** The service invokes the runtime as the session role. Anyone else you grant it to can reach a session's sandbox by its session ID, which is not a secret.
+ **Self-hosted**, run the tool runner where your own files and credentials are out of reach. See [What the model's commands can reach](claude-managed-agents-bedrock-self-hosted.md#claude-managed-agents-bedrock-self-hosted-what-the-model-s-commands-can-reach). **On AgentCore Runtime**, read the next two sections before your agents read content you don't control.

### What a command can do on AgentCore Runtime
<a name="claude-managed-agents-bedrock-security-what-a-command-can-do"></a>

Two things are true of every command on an AgentCore Runtime, whatever its permission policy and whatever the system prompt says:
+ **It can get the tool runner role's credentials.** The runtime's metadata service gives temporary credentials for the tool runner role to any code in the container, in either network mode. This is how AgentCore Runtime works, as [the AgentCore credentials guide](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/security-credentials-management.html) describes. A command that `bash` runs, and any program that command starts, can read them and use every permission the role has, in the container or wherever it sends them. They stay valid until they expire, also after the session is deleted.
+ **In public network mode, it can connect to any host on the internet.** The runtime that [Set up permissions and prerequisites](claude-managed-agents-bedrock-account-setup.md) creates uses public network mode, which doesn't limit where the container connects. A command can send what it reads, the role's credentials and the session's files included, to any host.

So text that steers the model, such as instructions hidden in a web page or a file the agent reads, can run commands that use the role's permissions and send its credentials or your data out of your account. Turning `bash` off stops the model from running commands, and `always_ask` lets you check each command before it runs. Neither limits what a command you allow can do.

### Keep the limits outside the container
<a name="claude-managed-agents-bedrock-security-keep-the-limits-outside"></a>

Put the limits that matter in IAM, your network, and the systems the agent calls. A command can change none of them, as long as the tool runner role has no permission to change them. Don't give the tool runner role IAM, network, or firewall write permissions.

1. **Keep credentials that the agent shouldn't hold out of the container.** When an agent needs to call a system that needs credentials, put the call behind an AgentCore Gateway and name the gateway in the agent's `mcp_servers`, as [Add tools and skills](claude-managed-agents-bedrock-tools.md) shows. The service calls the gateway, not the tool runner. The credentials for the system behind it stay with the gateway, in a credential provider that its target uses or in a target such as an AWS Lambda function with its own execution role. No command in the tool runner sees them. Where a command must start the call itself, give the tool runner role `lambda:InvokeFunction` on one Lambda function, and let the function hold the credentials. Either way, the model writes the arguments, so have the target check them and refuse anything the agent may not do.

1. **Give the tool runner role only what your agents' commands need.** Add `bedrock:CreateAnthropicSessionConnection`, so that the tool runner can connect. Give it no other API actions of this service, no permission to invoke a runtime, and no more Amazon S3 access than [S3 folders and files](#claude-managed-agents-bedrock-security-s3-folders-and-files) shows. Every session on a runtime runs as its role, so use a separate runtime and role for agents that need different permissions, or that read content you trust to different degrees.

1. **Limit where the container can connect.** Create the runtime in VPC network mode, in subnets you choose, when its commands shouldn't reach the internet freely. Its traffic then follows your route tables, security groups, and network ACLs, and can pass through a firewall that allows only the hosts you name, such as AWS Network Firewall with a domain allow list. The tool runner must still connect out to the service, at `bedrock.<region>.amazonaws.com` on port 443, so the subnets need a route to it, such as through a NAT gateway, or an interface VPC endpoint for Amazon Bedrock with private DNS turned on, as the `privatelink` example shows. A runtime with S3 folders or files also reaches Amazon S3. After you change a runtime's network, check that a session's tool runner still connects before you rely on it.

### Other limits
<a name="claude-managed-agents-bedrock-security-other-limits"></a>
+ **A system prompt asks the model to behave.** It enforces nothing. Put the limits that matter in IAM, in the credentials you give the tool runner, and in the systems the agent changes, such as branch protection on a repository.
+ **For actions with effects outside the tool runner,** use `always_ask` and approve each call, or check the request in the tool that performs it.

## S3 folders and files
<a name="claude-managed-agents-bedrock-security-s3-folders-and-files"></a>

The tool runner mounts a session's S3 folders and copies its S3 files as the tool runner role, and every session on a runtime runs as that role. Commands in the tool runner can read the role's credentials and call Amazon S3 directly, so a folder's `mount_as` is the mode it is mounted in, not a limit on S3. IAM keeps one session out of another's folder. The mount does not. For the policy, see [Use S3 folders and files](claude-managed-agents-bedrock-s3-folders-and-files.md).
+ **Grant the tool runner role only what its sessions need.** Scope each session's folder with `${aws:AgentCoreRuntimeSourceSid}`. A mount needs `s3:ListBucket` on its folder.
+ **Keep skills read-only in IAM.** Mount skills folders read-only, and give the role no write access to any prefix that no session should write. The service checks only one session's own entries, so another session can mount the same folder `read_write`.
+ **Limit who can update an agent.** Whoever writes an agent's skills chooses the instructions and folders of every session created from it.
+ **Share a writable folder only among sessions whose inputs you trust.** What one session writes there, every later session reads.
+ **Keep people's folders apart with a runtime and tool runner role for each person or team,** and keep their sessions apart with IAM policies on this API.
+ **Give the tool runner role only** **`bedrock:CreateAnthropicSessionConnection`** **from this API, and no permission to invoke an AgentCore Runtime,** as [Protect the tool runner](#claude-managed-agents-bedrock-security-protect-the-tool-runner) says.
+ **Deleting a session does not revoke credentials.** It stops the session's container and its mounts, but credentials the container already held stay valid until they expire. To stop access at once, revoke the tool runner role's active sessions, which affects every session on the runtime.
+ **Use buckets in the account that creates the session.** The tool runner names that account as the expected owner of every bucket it mounts or copies from, so Amazon S3 refuses a bucket in another account.

## Data protection
<a name="claude-managed-agents-bedrock-security-data-protection"></a>

The agent and session data that Claude Managed Agents needs to work is retained in an Amazon Bedrock service account managed by AWS.
+ **Model inference.** Claude Managed Agents makes its model calls under an IAM role in your own account, the session role. The same retention and review requirements apply to these calls as to your Claude model usage in Amazon Bedrock. See [Amazon Bedrock data retention](data-retention.md).
+ **Agents, sessions, and memory are retained.** Claude Managed Agents keeps what the service needs to run: each session's transcript, events, and memory stores. The transcript may include the prompts and model responses from those inference calls, and this content is kept as session data whatever retention applies to the model calls. It's stored in Amazon Bedrock in an AWS service account, encrypted at rest with an AWS owned key, or with your own AWS KMS key (see [Encryption at rest](claude-managed-agents-bedrock-encryption.md)). To limit what's kept, delete sessions and memory stores once you no longer need them.
+ **Session content is not shared with Anthropic.** The prompts and responses that Claude Managed Agents retains to run your sessions are not shared with Anthropic.

Archiving a session keeps its data. Deleting it removes it. Files the tools write stay where the tool runner wrote them, in your runtime's storage, your machine, your S3 folders, or systems the agent changed, and deleting the session does not remove them.

Model calls carry the prompts, the conversation, and tool results to Amazon Bedrock through a cross-Region inference profile. The profile ID's prefix sets where calls can be served. For example, an agent whose model is a `us.` inference profile ID is served in US Regions, one whose model is an `eu.` inference profile ID is served in EU Regions, and one whose model is a `global.` inference profile ID can be served in any commercial Region. Other geographic prefixes, such as `jp.`, `au.`, and `in.`, work the same way where Amazon Bedrock offers them.

Model calls go through Amazon Bedrock under your account's data retention mode. Claude Fable runs only in `aws_review` mode. See [Set it up in the console, Step 6](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-6-allow-aws-review-if-your-agents-use-claude-fable), before you change it.

Keep credentials out of system prompts, messages, `metadata`, and resource descriptions. The service stores all of them, and the model sees the prompts, the messages, and the descriptions.

## Customer managed keys
<a name="claude-managed-agents-bedrock-security-customer-managed-keys"></a>

The service encrypts stored content at rest with an AWS owned key, or with a customer managed AWS KMS key that you set on the project. For what the key covers, its key policy, setup, and monitoring, see [Encryption at rest](claude-managed-agents-bedrock-encryption.md).