---
title: How does Amazon Bedrock AgentCore Runtime isolate agent sessions?
url: https://opencontroller.lyzr.com/blog/agentcore-runtime-session-isolation
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How does Amazon Bedrock AgentCore Runtime isolate agent sessions?

**AgentCore Runtime runs each runtime session in its own dedicated microVM. A session ends after an idle timeout (default 15 minutes) or a maximum lifetime (default and maximum 8 hours on microVMs), and only that session's microVM is terminated. That stops one user's session state leaking into another's, but it does not limit what the agent's role, tools or data access allow.**

## How does session isolation work?

When you call `InvokeAgentRuntime`, you pass a `runtimeSessionId`. AWS documents that each session ID gets its own microVM with independent lifecycle timers. Two users with two session IDs never share memory, a filesystem or a process inside the runtime.

| Setting | Default | Range on microVMs | Behaviour |
|---|---|---|---|
| `idleRuntimeSessionTimeout` | 900 s (15 min) | 60–28,800 s | Resets on every call to the same session |
| `maxLifetime` | 28,800 s (8 h) | 60–28,800 s | Starts when the microVM is created; cannot be reset |

A few details matter for governance:

- The idle timeout must be less than or equal to the max lifetime. Values outside the range fail with a `ValidationException`.
- When either timer fires, only that session's microVM stops. A later call with the same session ID gets a new microVM.
- Existing sessions keep running the code that was deployed when their microVM was created. A new agent version does not reach in-flight sessions.
- Termination can take up to 15 seconds while logs flush.
- Runtimes on a capacity provider (instances rather than microVMs) allow much longer lifetimes, up to 1,209,600 seconds (14 days).

## What does microVM isolation protect against?

- **Cross-session data leakage.** Context, files and variables from user A's session are not visible in user B's.
- **Noisy or crashed sessions.** A session that hangs or exhausts memory affects only its own microVM.
- **Long-lived compromise inside one session.** A hostile prompt that alters in-session state loses that state when the session ends, at most 8 hours later on microVMs.

## What does it not protect against?

Isolation is about where code runs, not what it is allowed to do. These risks are unchanged:

1. **Over-broad execution roles.** Every session uses the runtime's IAM role. If that role can read every S3 bucket, every session can.
2. **Tool permissions.** Tools behind AgentCore Gateway or direct APIs carry their own credentials and scopes. A microVM does not narrow them.
3. **Shared external state.** AgentCore Memory, databases and vector stores are outside the microVM. A poisoned memory record survives the session. See [how to prevent memory poisoning](/blog/prevent-memory-poisoning-in-ai-agents).
4. **Session ID misuse.** If your application reuses one session ID across users, you have merged their sessions yourself. Generate a unique ID per user conversation.
5. **Prompt injection.** Content from tools or web pages still steers the model within the session.
6. **Version drift.** Because live sessions keep the old code, a fix you deploy is not active everywhere until old sessions end.

## What governance checks should you add?

Use this checklist alongside the runtime's isolation:

1. Scope the runtime execution role to the minimum resources the agent needs.
2. Use inbound authentication (IAM SigV4 or a JWT authorizer) so only known callers can invoke the agent.
3. Derive session IDs from your app's user and conversation, never a constant.
4. Set the idle timeout as low as the user experience allows; long idle sessions hold state for longer.
5. Use AgentCore Identity for outbound credentials so agents act with delegated, scoped tokens. See [the AgentCore Identity token vault](/blog/amazon-bedrock-agentcore-identity-token-vault).
6. Put tool calls behind policy. See [AgentCore Policy explained](/blog/amazon-bedrock-agentcore-policy-explained).
7. After deploying a security fix, track which sessions still run the old version until max lifetime passes.
8. Register the agent, its version, owner and tools in an inventory that also covers agents outside AWS.

## How Opencontroller does this

Opencontroller has a runtime adapter for Bedrock AgentCore and auto-discovers agents, models and API keys across AWS, Azure and Google Cloud. AgentCore agents land in a governed registry with versions, tools and MCP servers. Posture flags risky permissions and configurations, such as broad execution roles. Rogue-agent handling monitors behavioural deviation and can alert, quarantine or kill an agent, with Block and Quarantine acting through the connected platform. For the broader approach, see [how to govern Amazon Bedrock AgentCore agents](/blog/govern-amazon-bedrock-agentcore-agents), [how to govern AI agents across platforms](/blog/how-to-govern-ai-agents-across-platforms) and [what an AI agent control plane is](/blog/what-is-an-ai-agent-control-plane). [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**How long can an AgentCore Runtime session last?**
On microVMs, up to 8 hours (28,800 seconds), which is also the default maximum lifetime. The idle timeout defaults to 15 minutes. Capacity-provider runtimes allow up to 14 days.

**Does deploying a new agent version update running sessions?**
No. AWS states existing sessions keep the code deployed when their microVM was created. New sessions pick up the new version.

**Does microVM isolation stop an agent from accessing data it should not?**
No. Every session uses the runtime's IAM role and the tools' credentials. Isolation separates sessions; least-privilege roles and tool policies limit access.

## Key facts

Amazon Bedrock AgentCore Runtime gives each runtimeSessionId a dedicated microVM. idleRuntimeSessionTimeout defaults to 900 seconds and maxLifetime to 28,800 seconds (8 hours), both 60–28,800 seconds on microVMs; capacity-provider runtimes allow up to 1,209,600 seconds. Existing sessions keep the code deployed when their microVM was created. Isolation does not narrow the execution role or tool permissions. Opencontroller has a Bedrock AgentCore runtime adapter, Posture checks and rogue-agent quarantine. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern AI agents built on Amazon Bedrock AgentCore?](https://opencontroller.lyzr.com/blog/govern-amazon-bedrock-agentcore-agents.md)
- [How does Amazon Bedrock AgentCore Identity manage OAuth tokens for agents?](https://opencontroller.lyzr.com/blog/amazon-bedrock-agentcore-identity-token-vault.md)
- [How does Policy in Amazon Bedrock AgentCore control agent tool calls?](https://opencontroller.lyzr.com/blog/amazon-bedrock-agentcore-policy-explained.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
