Field SOP
Field SOP

Bedrock AgentCore V2 Snapshots: Four Patterns, One Pre-warm

Turns the four official AWS section names into a checkable sequence for Bedrock AgentCore runtime V2 session startup: measure Latency and OverheadLatency in CloudWatch first, move imports and static data into init, use Working with hooks for build-time large files, then send a background warm-up request with Pre-warm on user engagement and keep the session ID. It records the 120-second /ping gate, that the V2 default applies only to new and updated runtimes, that existing ones need explicit platformVersion=V2, and that the sample code is for non-production use. The Region and cold-start discrepancies between the two official pages are kept side by side.

Published November 15, 20269 min read
<!-- bedrock-agentcore-v2-session-sop | sop | Bedrock AgentCore V2 Snapshots: Four Patterns, One Pre-warm -->

As of November 14, 2026, the most common misreading of this Bedrock AgentCore runtime update is to call all four official sections pre-warm modes. In the architecture article dated 13 NOV 2026, AWS describes four patterns to keep work off the first request, which this article calls the Four Patterns for short. Of the four, the first is measurement, the second is a code-structure change, the third is build-time hooks, and only the fourth, Pre-warm on user engagement, is literally pre-warm. Calling the whole set of Four Patterns pre-warm suggests four separate switches and blurs three distinct actions. This article turns each official section name into a checkable step, covering the V2 Snapshots restore mechanism, the 120 seconds /ping gate, two CloudWatch metrics, and the boundary each pattern addresses. Figures follow the four official AWS pages, and in practice that confusion means teams tune a switch when they should be measuring, or rewrite a handler when the bottleneck is elsewhere. Verify everything against the official pages and your own measurements.

One: what V2 actually changes, default, Snapshots, and the migration switch

As the What's New page (Posted on: Nov 12, 2026) puts it, the new runtime restores each session from a snapshot of your initialized agent, scales compute and memory with the work, and scales idle agents to zero. Every session still runs in its own hardware-isolated Firecracker microVM. A session resumes from an already initialized state, which is why cold starts stop growing linearly with image size. Since November 12, 2026, newly created runtimes use the next generation by default, with the relative time word rewritten rather than quoted verbatim.

It applies only to new and updated runtimes. Existing runtimes stay on the current version until you move them. To move an existing runtime to the next generation you must set platformVersion=V2 explicitly, and if you want to keep it on the old generation you set V1. Reading default V2 as an automatic upgrade of existing runtimes is the easiest mistake here.

According to the Weekly Roundup page (November 9, 2026), create and update take several minutes while the snapshot is prepared, and your container must report healthy on /ping within 120 seconds. The architecture article is more specific: when you create or update a runtime, AgentCore runtime starts your container in a fresh microVM and waits for the first healthy ping, a GET /ping, which must arrive within 120 seconds. It then clears the operating system's file cache to keep the snapshot small, freezes the microVM, and stores its memory and disk as a snapshot. Read as a chain, whether /ping returns healthy within 120 seconds decides whether that snapshot can exist at all.

Capacity and metrics should not be read as measured usage. The official line says sessions scale to 8 vCPU and 32 GB of memory and support container images up to 10 GB; these are per-session ceilings, not numbers observed in a particular run. On a 2 GB image, sessions start in under 2 seconds at P75, down from 29.7 seconds on the previous generation. Keep both P75 and the 2 GB image qualifier; this is not an average or a claim about every image size. For multi-turn agents the page cites up to 68% less billed memory per session, which is an upper bound rather than a guarantee. V2 was noted in 10 Regions, with committed baseline pricing coming soon.

Two: Measure before you optimize, measure first, change nothing yet

The first section name is a method: Measure before you optimize. AWS states that AgentCore runtime publishes both as Amazon CloudWatch metrics in the AWS/Bedrock-AgentCore namespace. One is Latency, the time to first byte. The other is OverheadLatency, the part that belongs to the platform, such as starting the microVM and restoring the snapshot on a new session. Reading both shows whether the slow part is platform-side or application-side. The three steps that follow target different bottlenecks, so measuring first avoids tuning the wrong component. Report P90 or P99 rather than the average, since an average flattens the long tail users notice. Keep it as a baseline for the later steps. Without measuring first, it is easy to mistake platform overhead for slow application initialization, or the reverse. Measure before you optimize is measurement, not pre-warm, and changes no code path.

Three: Keep work off the first request, move work ahead of it

Keep work off the first request means moving work off it. The method is to put imports, client construction, and static data loading into the init phase, that is, before app.run() and before /ping reports healthy. Init happens before the container is frozen into a snapshot, and that state is restored with the snapshot, so work is moved to before the session resumes. This is a code-structure change, not a pre-warm switch. The official text says Files from your image are loaded lazily, and the file cache is cleared before the freeze. Together these mean reading image files in init does not buy speed; construct resident state, clients, and static data instead. For cases that genuinely need files and toolchains, the official direction is to copy long-lived helpers and toolchains to the RAM disk /dev/shm and to set UV_COMPILE_BYTECODE=1 so bytecode is compiled in advance. The first keeps needed content in a memory-backed disk, the second moves bytecode compilation earlier, and both shift work from runtime into preparation. Verify init precedes app.run(), that reading image files in init is not assumed to help, and that resident content sits in /dev/shm.

Four: Working with hooks, cover what init cannot reach

The third section name is Working with hooks. The architecture article notes that the runtime now supports build hooks: a build hook receives two POST calls during the build, one before the snapshot is taken and one after a test restore. Its role is specific, to handle things init cannot cover, such as large files, command-line tools, or browser binaries that are awkward to construct inside init. In the official wording, the X-Amzn-Bedrock-AgentCore-Runtime-Warmup-Type header tells your agent which call it's handling, with memory for the first and disk for the second. AWS is explicit that dynamic data, for example tool catalogs, feature flags, and credentials, must still be loaded in the handler with a TTL cache, because a snapshot freezes one moment and baking changing values into it yields stale ones. This makes the boundary between build time and runtime concrete: large static pieces that can be fixed at build time go through hooks, while dynamic data cannot rely on them. Working with hooks is build-time capture, not literal pre-warm; counting it as pre-warm blurs build-time capture and triggering a session before the first request.

Five: Pre-warm on user engagement, the only pattern that is literally pre-warm

Pre-warm on user engagement is the only one of the four whose name carries Pre-warm. The official recipe is concrete: Generate a session ID, send the agent a warm-up request in the background, and keep the session ID with the conversation. When the user later sends a real message, the same session ID is reused and hits a session that is already prepared, so the startup wait is absorbed before the user acts. Unlike the first three, this does not move work but triggers the session early. AWS says This pattern needs no extra infrastructure and fully hides session start whenever users take more than about 2 seconds, a condition rather than a promise of unconditional zero cold starts. The cost is stated just as plainly: It costs a session for each user who engages but never sends a prompt, and a short idle timeout keeps that small. When verifying, hold the condition and the cost together: background warm-up request, reuse of the session ID, hiding startup only when more than about 2 seconds pass, and a short idle timeout to contain empty sessions. Of the Four Patterns, only Pre-warm on user engagement is literally pre-warm; the other three are measurement, a code-structure change, and build-time hooks, the point of Four Patterns, One Pre-warm.

Six: wrap-up, a checkable list, two official discrepancies, and the H4 boundary

Checklist, verify item by item: what each of the Four Patterns solves, measurement, moving work off the first request, build-time hooks, and literal pre-warm; /ping reporting healthy within 120 seconds; the split between the two CloudWatch metrics Latency and OverheadLatency; dynamic data not belonging in a snapshot; and the sample code being for non-production use. These five cover mechanism, metrics, and boundaries and can each be checked against the official pages without any outside inference.

Two official disagreements are kept side by side, with no choosing one and no explaining them on AWS's behalf. Region count: the Weekly Roundup page says 10 Regions, while the What's New page lists 19 Regions; both figures are retained. Cold-start wording: the What's New page gives a fixed point value for a 2 GB image, on a 2 GB image, under 2 seconds at P75, down from 29.7 seconds on the previous generation; the Weekly Roundup page gives a range trend, about 2 seconds for images from 200 MB up to 2 GB, while the original runtime rose from roughly 5.4 seconds to nearly 30 seconds as images grew. One is a point value, the other a trend; both are kept without preference or speculation.

A second guide dated 13 NOV 2026 is one sentence of method background only: price per token alone isn't a reliable guide, and routing should be judged by cost per solved task, the total cost of your runs divided by the number of runs whose tests pass. This article does not expand it into a cost-routing SOP. Keep Stage and Random separate: they are two routing strategies (Neither strategy calls a judge model.), a different track from the Four Patterns in the H3 article. Its sample also needs its boundary stated: it installs switchyard-server 0.3.0 from crates.io and runs the published LiteLLM v1.102.0 image; NVIDIA documents switchyard-server 0.3.0 as a demo and evaluation component, and the official note says This is sample code, for non-production usage, with an experimental integration. It is sample code, for non-production use, and experimental, not for production. No console buttons, menu paths, or screenshots are invented, and no zero cold starts are promised; everything rests on the official pages and your own measurements.

This article covers the Four Patterns that move work off the first request during session startup, not runtime selection, concurrency, or observability as a whole. For runtime selection see the runtime selection article, for concurrency the concurrency comparison, for metrics and tracing the observability article, and for SDK differences the SDK comparison. The startup and shutdown hotspot is news commentary, not a step-by-step tutorial.

FAQ

Q1: Are the Four Patterns four kinds of pre-warm? A1: No. They match four official section names: Measure before you optimize is measurement, Keep work off the first request is a code-structure change, Working with hooks is build-time hooks, and only the fourth, Pre-warm on user engagement, is literally pre-warm. Calling all four pre-warm confuses measuring, editing init, and hooks.

Q2: Will an existing runtime be upgraded to V2 automatically? A2: No. Since November 12, 2026 the next generation is the default only for new and updated runtimes; existing runtimes stay on the current version until you move them. Set platformVersion=V2 to migrate one, or V1 to keep the old generation.

Q3: Where exactly do /ping and 120 seconds apply? A3: When you create or update a runtime, the container starts in a fresh microVM and AgentCore runtime waits for the first healthy ping, a GET /ping, which must arrive within 120 seconds. It then clears the file cache, freezes the microVM, and stores memory and disk as a snapshot. Create and update take several minutes to prepare the snapshot, and the 120 seconds /ping gate is the precondition for that snapshot to exist.

Q4: Are 8 vCPU, 32 GB, 10 GB, and under 2 seconds measured values? A4: They are not measured usage. 8 vCPU, 32 GB of memory, and 10 GB images are per-session ceilings. Under 2 seconds must keep the qualifiers on a 2 GB image and P75, with 29.7 seconds on the previous generation; it cannot be stated as an average or applied to every image. Up to 68% less billed memory per session is an upper bound, not a guarantee.

Q5: Why can dynamic data not be fixed by build hooks or a snapshot? A5: A snapshot freezes one moment in time, so baking changing tool catalogs, feature flags, or credentials into it only yields stale values. AWS requires dynamic data to be loaded in the handler with a TTL cache. Build hooks handle static heavy pieces that init cannot reach, such as large files, command-line tools, and browser binaries.

Related reading

This article is AI-assisted and human-edited. Last updated: 2026-11-15

FAQ

Are the Four Patterns four kinds of pre-warm?
No. They match four official section names: Measure before you optimize is measurement, Keep work off the first request is a code-structure change, Working with hooks is build-time hooks, and only the fourth, Pre-warm on user engagement, is literally pre-warm. Calling all four pre-warm confuses measuring, editing init, and hooks.
Will an existing runtime be upgraded to V2 automatically?
No. Since November 12, 2026 the next generation is the default only for new and updated runtimes; existing runtimes stay on the current version until you move them. Set platformVersion=V2 to migrate one, or V1 to keep the old generation.
Where exactly do /ping and 120 seconds apply?
When you create or update a runtime, the container starts in a fresh microVM and AgentCore runtime waits for the first healthy ping, a GET /ping, which must arrive within 120 seconds. It then clears the file cache, freezes the microVM, and stores memory and disk as a snapshot. Create and update take several minutes to prepare the snapshot, and the 120 seconds /ping gate is the precondition for that snapshot to exist.
Are 8 vCPU, 32 GB, 10 GB, and under 2 seconds measured values?
They are not measured usage. 8 vCPU, 32 GB of memory, and 10 GB images are per-session ceilings. Under 2 seconds must keep the qualifiers on a 2 GB image and P75, with 29.7 seconds on the previous generation; it cannot be stated as an average or applied to every image. Up to 68% less billed memory per session is an upper bound, not a guarantee.
Why can dynamic data not be fixed by build hooks or a snapshot?
A snapshot freezes one moment in time, so baking changing tool catalogs, feature flags, or credentials into it only yields stale values. AWS requires dynamic data to be loaded in the handler with a TTL cache. Build hooks handle static heavy pieces that init cannot reach, such as large files, command-line tools, and browser binaries.

Related

Field SOP

GitHub Copilot: Six Models Deprecated December 14, What to Fix

Six GitHub Copilot models are deprecated on December 14, 2026, and the official November 13, 2026 changelog gives six migration sentences but no configuration file name, model ID string or migration script. This SOP turns those sentences into a checkable list: replace hardcoded model names in workflows and integrations, enable model policies in Copilot settings, and understand what global default, the model selector, Copilot Chat, inline edits and code completions each do. All six model names and suggested alternatives are quoted as published, Kimi K3 stays To be announced, and the Claude Haiku 4.5 annual-plan exception for individual subscribers is spelled out.

Nov 16, 20269 min read
Field SOP

OpenRouter: MCP Costs 17x More, Tool Results Are the Culprit

A measurement published by OpenRouter on November 11, 2026 wired one cli/cli repository question three ways: on Claude Sonnet 5.5, the default MCP server used 42 times the CLI input tokens and cost 17 times as much, $127 against $7.50 per 1,000 tasks. The official TL;DR points at tool results rather than tool definitions as what fills the context, with 20,400, 42,182, and an 8,336 to 714 trim all checkable row by row. This is a single-task measurement and a self-check list, not an integration guide or a price comparison. Tool Search varies by model: it lowers the full-task total on Sonnet while making Haiku and Gemini more expensive, and it does not shrink tool results. Run mcp_cost.py on your own tasks before deciding, as the official post advises.

Nov 13, 20269 min read