Amazon Bedrock AgentCore Runtime V2 Is Now the Default

Amazon Bedrock AgentCore Runtime V2 Is Now the Default

AgentCore Runtime now defaults to V2 in both the console and AWS CLI; V1 must be specified explicitly. I also checked the 8 vCPU / ~32 GB sessions and a 9.7 GB image, beyond the old limit, in the Tokyo region.
2026.12.04

This page has been translated by machine translation. View original

Introduction

On November 12, 2026, it was announced that Amazon Bedrock AgentCore Runtime V2 will become the default for new Runtimes.

https://aws.amazon.com/jp/about-aws/whats-new/2026/11/new-agentcore-runtime-default/

I introduced Runtime V2 in September. In this article, I share the results of trying the updates since then, including V2 being used as the default Runtime.

https://dev.classmethod.jp/articles/amazon-bedrock-agentcore-runtime-v2-tried/

Test environment

  • Region: Tokyo (ap-northeast-1)
  • AWS CLI: 2.43.2

Console display

On the console's Create runtime screen, "V2 - recommended" under Runtime platform versions was selected by default.

On the Create runtime screen, "V2 - recommended" is selected under Runtime platform versions

Omitting platformVersion (default)

I ran create-agent-runtime without specifying platformVersion.

aws bedrock-agentcore-control create-agent-runtime \
  --agent-runtime-name v2probe_omit_dec \
  --agent-runtime-artifact '{"containerConfiguration":{"containerUri":"111122223333.dkr.ecr.ap-northeast-1.amazonaws.com/devio-v2-probe:small"}}' \
  --role-arn arn:aws:iam::111122223333:role/AgentExecutionRole \
  --network-configuration '{"networkMode":"PUBLIC"}' \
  --region ap-northeast-1

I specified the ID of the created Runtime and checked the platform version.

aws bedrock-agentcore-control get-agent-runtime \
  --agent-runtime-id <runtime-id> \
  --region ap-northeast-1 \
  --query '{id:agentRuntimeId,status:status,platformVersion:platformVersion,resourceConfigurations:resourceConfigurations,createdAt:createdAt,lastUpdatedAt:lastUpdatedAt}'

As announced, the platformVersion was V2.

{
    "id": "<runtime-id>",
    "status": "READY",
    "platformVersion": "V2",
    "resourceConfigurations": null,
    "createdAt": "2026-12-03T14:52:39.709168+00:00",
    "lastUpdatedAt": "2026-12-03T14:55:44.177774+00:00"
}

Specifying V1 with platformVersion

In the AWS CLI, add --platform-version V1 to create-agent-runtime.

aws bedrock-agentcore-control create-agent-runtime \
  --agent-runtime-name v2probe_v1_dec \
  --agent-runtime-artifact '{"containerConfiguration":{"containerUri":"111122223333.dkr.ecr.ap-northeast-1.amazonaws.com/devio-v2-probe:small"}}' \
  --role-arn arn:aws:iam::111122223333:role/AgentExecutionRole \
  --network-configuration '{"networkMode":"PUBLIC"}' \
  --platform-version V1 \
  --region ap-northeast-1

Using the same get-agent-runtime command as in the previous section, I confirmed that it was running on V1.

{
    "id": "<runtime-id>",
    "status": "READY",
    "platformVersion": "V1",
    "resourceConfigurations": null,
    "createdAt": "2026-12-03T15:25:49.384032+00:00",
    "lastUpdatedAt": "2026-12-03T15:25:50.750456+00:00"
}

Updates since September

The official blog post in September listed larger RAM and vCPU as future plans.

https://aws.amazon.com/blogs/machine-learning/the-new-agentcore-runtime-elastic-optimized-and-consistently-fast-starts/

According to the November announcement, V2 sessions now support up to 8 vCPU / 32 GB, and container images up to 10 GB. So I verified the session vCPU and memory, as well as the container image size.

Test container

I used the same app container for both checks. This container returns the CPU count and memory status according to the specification (mode) at invocation. It can also allocate a specified amount of memory and run a process that uses up the CPU for 3 seconds. The image is arm64.

Code and Dockerfile of the test container

app.py

"""AgentCore Runtime 検証用プローブ。標準ライブラリだけで /ping と /invocations を提供する。"""

import json
import logging
import multiprocessing
import os
import time
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from typing import Any

logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
logger = logging.getLogger("probe")

def read_text(path: str) -> str | None:
    try:
        with open(path, encoding="utf-8") as f:
            return f.read().strip()
    except OSError:
        return None

def meminfo_kib(key: str) -> int | None:
    text = read_text("/proc/meminfo") or ""
    for line in text.splitlines():
        if line.startswith(key + ":"):
            return int(line.split()[1])
    return None

def probe() -> dict[str, Any]:
    return {
        "os_cpu_count": os.cpu_count(),
        "sched_getaffinity": len(os.sched_getaffinity(0)),
        "cgroup_cpu_max": read_text("/sys/fs/cgroup/cpu.max"),
        "cgroup_memory_max": read_text("/sys/fs/cgroup/memory.max"),
        "cgroup_memory_high": read_text("/sys/fs/cgroup/memory.high"),
        "meminfo_MemTotal_MiB": (meminfo_kib("MemTotal") or 0) // 1024,
        "meminfo_MemAvailable_MiB": (meminfo_kib("MemAvailable") or 0) // 1024,
        "pid": os.getpid(),
    }

def allocate(mb: int) -> dict[str, Any]:
    """mb MiB を 256 MiB ずつ確保し、全ページに書き込む。"""
    chunks: list[bytearray] = []
    start = time.monotonic()
    done = 0
    try:
        while done < mb:
            size = min(256, mb - done)
            chunk = bytearray(size * 1024 * 1024)
            for i in range(0, len(chunk), 4096):
                chunk[i] = 1
            chunks.append(chunk)
            done += size
    except MemoryError:
        return {"ok": False, "allocated_MiB": done, "error": "MemoryError"}
    finally:
        elapsed = round(time.monotonic() - start, 2)
    result = {"ok": True, "allocated_MiB": done, "seconds": elapsed, "after": probe()}
    chunks.clear()
    return result

def burn(seconds: float) -> float:
    end = time.monotonic() + seconds
    n = 0
    while time.monotonic() < end:
        n += 1
    return time.process_time()

def cpu_test(seconds: float, workers: int) -> dict[str, Any]:
    start = time.monotonic()
    with multiprocessing.Pool(workers) as pool:
        cpu_times = pool.map(burn, [seconds] * workers)
    wall = time.monotonic() - start
    return {
        "workers": workers,
        "wall_seconds": round(wall, 2),
        "cpu_seconds_total": round(sum(cpu_times), 2),
        "effective_vcpus": round(sum(cpu_times) / seconds, 2),
    }

def file_info(path: str) -> dict[str, Any]:
    try:
        return {"path": path, "bytes": os.path.getsize(path)}
    except OSError as e:
        return {"path": path, "error": str(e)}

def handle(payload: dict[str, Any]) -> dict[str, Any]:
    mode = payload.get("mode", "probe")
    if mode == "probe":
        return {"probe": probe(), "filler": file_info("/filler/data.bin")}
    if mode == "alloc":
        return {"before": probe(), "alloc": allocate(int(payload["mb"]))}
    if mode == "cpu":
        workers = int(payload.get("workers", os.cpu_count() or 1))
        return {"cpu": cpu_test(float(payload.get("seconds", 3)), workers)}
    return {"error": f"unknown mode {mode}"}

class Handler(BaseHTTPRequestHandler):
    def _send(self, code: int, body: dict[str, Any]) -> None:
        data = json.dumps(body).encode()
        self.send_response(code)
        self.send_header("Content-Type", "application/json")
        self.send_header("Content-Length", str(len(data)))
        self.end_headers()
        self.wfile.write(data)

    def do_GET(self) -> None:
        if self.path == "/ping":
            self._send(200, {"status": "Healthy"})
        else:
            self._send(404, {"error": "not found"})

    def do_POST(self) -> None:
        if self.path != "/invocations":
            self._send(404, {"error": "not found"})
            return
        length = int(self.headers.get("Content-Length", "0"))
        raw = self.rfile.read(length) if length else b"{}"
        try:
            payload = json.loads(raw or b"{}")
            self._send(200, handle(payload))
        except Exception as e:  # noqa: BLE001 - 検証用に全例外を応答へ返す
            logger.exception("invocation failed")
            self._send(500, {"error": repr(e)})

    def log_message(self, fmt: str, *args: Any) -> None:
        logger.info(fmt, *args)

if __name__ == "__main__":
    logger.info("starting on 8080")
    ThreadingHTTPServer(("0.0.0.0", 8080), Handler).serve_forever()

Dockerfile

FROM python:3.12-slim
WORKDIR /app
COPY app.py /app/app.py
EXPOSE 8080
CMD ["python", "/app/app.py"]

make-filler-dockerfile.sh writes to standard output a Dockerfile that adds <GB> 1 GiB files of random data. Specify the image built with the Dockerfile above as <BASE_IMAGE>.

#!/usr/bin/env bash
# usage: make-filler-dockerfile.sh <BASE_IMAGE> <GB>  > Dockerfile.filler
# Put random data into a separate layer for each 1 GiB (hard to compress, and pushes run in parallel)
set -euo pipefail
base="$1"; gb="$2"
echo "FROM ${base}"
echo "RUN mkdir -p /filler"
for i in $(seq 1 "$gb"); do
  echo "RUN head -c 1073741824 /dev/urandom > /filler/data-${i}.bin"
done
echo "RUN ln -s /filler/data-1.bin /filler/data.bin"

Session vCPU and memory

To get an 8 vCPU / 32 GB session, I set minimumMemoryInMiB to 8192 in resourceConfigurations when creating the V2 Runtime.

aws bedrock-agentcore-control create-agent-runtime \
  --agent-runtime-name m_v2mem8192 \
  --agent-runtime-artifact '{"containerConfiguration":{"containerUri":"111122223333.dkr.ecr.ap-northeast-1.amazonaws.com/devio-v2-probe:small"}}' \
  --role-arn arn:aws:iam::111122223333:role/AgentExecutionRole \
  --network-configuration '{"networkMode":"PUBLIC"}' \
  --platform-version V2 \
  --resource-configurations minimumMemoryInMiB=8192 \
  --region ap-northeast-1

I measured the vCPU and memory inside the session in three configurations: V1, V2 without resourceConfigurations (hereafter, "no configuration"), and V2 with minimumMemoryInMiB set to 8192. vCPU was obtained from os.cpu_count, and total memory from MemTotal in /proc/meminfo. Effective vCPU was calculated by running computation in as many processes as the CPU count for 3 seconds and dividing the total CPU time obtained by 3 seconds.

Configuration vCPU Total memory (MiB) Effective vCPU Memory allocation result
V1 2 8,016 1.99 6,144 MiB succeeded, 9,216 MiB RuntimeClientError (502)
V2 no configuration 2 8,016 2.0 6,144 MiB succeeded, 9,216 MiB RuntimeClientError (runtime startup error)
V2 minimumMemoryInMiB 8192 8 32,124 8.0 16,384 MiB and 30,720 MiB succeeded

With V2 and minimumMemoryInMiB set to 8192, MemAvailable still had 739 MiB remaining right after allocating 30,720 MiB.

Container image size

I added 1 GiB layers filled with random data and built images of 3.3 GB and 9.7 GB compressed. Since random data is barely compressible, the size after extraction is almost the same as the compressed size. The compressed size of an image can be checked in ECR.

aws ecr describe-images \
  --repository-name devio-v2-probe \
  --region ap-northeast-1 \
  --query 'imageDetails[].[imageTags[0],imageSizeInBytes]' \
  --output text

The sizes in ECR were 3,265,749,946 bytes (3.04 GiB) for the 3.3 GB image and 9,710,169,862 bytes (9.04 GiB) for the 9.7 GB image. Using each image, I created Runtimes with the following configurations.

Compressed size platformVersion minimumMemoryInMiB Result
3.3 GB V1 None Creation rejected
3.3 GB V2 None READY, invocation succeeded
3.3 GB V2 8192 READY, invocation succeeded
9.7 GB V2 None CREATE_FAILED
9.7 GB V2 4096 CREATE_FAILED
9.7 GB V2 8192 READY, invocation succeeded (8 vCPU / about 32 GB)

Specifying the 3.3 GB image on V1 resulted in the following error at creation.

aws: [ERROR]: An error occurred (ServiceQuotaExceededException) when calling the CreateAgentRuntime operation: maxImageSizeMb limit exceeded for account 111122223333. Please contact AWS Support for more information.

When I specified the 9.7 GB image on V2 with no configuration, it ended in CREATE_FAILED, and the failureReason from get-agent-runtime was as follows.

"failureReason": "The container image needs more build disk than this runtime has. The build disk scales with the runtime's memory, so reduce the image size or request more memory. For troubleshooting, see https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-troubleshooting.html"

Summary

I confirmed that Runtime V2, released in September, is now used as the default Runtime.

Since its release, V2 has also received enhancements such as more memory and CPU and support for larger container images, so I recommend using V2 when creating a new Runtime.

If you need a V1 Runtime for a workload developed on the assumption of V1, please note that you must explicitly specify the platform version at creation.

Share this article

AWSのお困り事はクラスメソッドへ