
Amazon Bedrock AgentCore Runtime の V2 がデフォルトになりました
はじめに
2026年11月12日、新規の Runtime では Amazon Bedrock AgentCore Runtime V2 が既定になるという案内がありました。
9月に Runtime V2 を紹介しましたが、この記事では、既定の Runtime として V2 が使われることを含め、その後のアップデートを試した結果を紹介します。
検証環境
- リージョン:東京(ap-northeast-1)
- AWS CLI:2.43.2
コンソールの表示
コンソールの Create runtime 画面では、Runtime platform versions の「V2 - recommended」が初期状態で選択されていました。

platformVersion を省略(既定)
platformVersion を付けずに create-agent-runtime を実行しました。
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
作成した Runtime の ID を指定して、プラットフォームバージョンを確認しました。
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}'
案内のとおり、platformVersion は 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"
}
platformVersion で V1 を指定
AWS CLI では、create-agent-runtime に --platform-version V1 を加えます。
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
前節と同じ get-agent-runtime コマンドで、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"
}
9月以降のアップデート
9月の公式ブログでは、より大きな RAM と vCPU が今後の予定として挙げられていました。
11月の案内では、V2 のセッションが最大 8 vCPU / 32 GB、コンテナイメージが最大 10 GB になっています。そこで、セッションの vCPU とメモリ、コンテナイメージのサイズを確かめました。
検証用コンテナ
どちらの確認にも同じアプリのコンテナを使いました。このコンテナは、呼び出し時の指定(mode)に応じて、CPU 数とメモリの状態を返します。指定した量のメモリの確保と、CPU を3秒間使い切る処理も行えます。イメージは arm64 です。
検証用コンテナのコードと Dockerfile
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 は、乱数の 1 GiB ファイルを <GB> 個足す Dockerfile を標準出力へ書き出します。<BASE_IMAGE> には、上の Dockerfile で作ったイメージを指定します。
#!/usr/bin/env bash
# usage: make-filler-dockerfile.sh <BASE_IMAGE> <GB> > Dockerfile.filler
# 乱数データを 1 GiB ずつ別レイヤーにする(圧縮されにくく、push も並列になる)
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"
セッションの vCPU とメモリ
8 vCPU / 32 GB のセッションを得るために、V2 の作成時に resourceConfigurations で minimumMemoryInMiB を 8192 にしました。
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
セッション内の vCPU とメモリを、3つの構成で測りました。V1、resourceConfigurations を指定しない V2(以下、構成なし)、minimumMemoryInMiB に 8192 を指定した V2 です。vCPU は os.cpu_count、メモリ総量は /proc/meminfo の MemTotal から取得しています。実効 vCPU は、CPU 数と同じ数のプロセスで3秒間計算を回し、得られた CPU 時間の合計を3秒で割って求めています。
| 構成 | vCPU | メモリ総量 (MiB) | 実効 vCPU | メモリ確保の結果 |
|---|---|---|---|---|
| V1 | 2 | 8,016 | 1.99 | 6,144 MiB は成功、9,216 MiB は RuntimeClientError(502) |
| V2 構成なし | 2 | 8,016 | 2.0 | 6,144 MiB は成功、9,216 MiB は RuntimeClientError(runtime の起動エラー) |
| V2 minimumMemoryInMiB 8192 | 8 | 32,124 | 8.0 | 16,384 MiB と 30,720 MiB は成功 |
minimumMemoryInMiB に 8192 を指定した V2 では、30,720 MiB を確保した直後も MemAvailable が 739 MiB 残っていました。
コンテナイメージのサイズ
乱数で埋めた 1 GiB のレイヤーを足して、圧縮後 3.3 GB と 9.7 GB のイメージを作りました。乱数はほとんど圧縮されないため、展開後も圧縮後とほぼ同じ大きさです。イメージの圧縮後サイズは、ECR で確認できます。
aws ecr describe-images \
--repository-name devio-v2-probe \
--region ap-northeast-1 \
--query 'imageDetails[].[imageTags[0],imageSizeInBytes]' \
--output text
ECR 上のサイズは、3.3 GB のイメージが 3,265,749,946 バイト(3.04 GiB)、9.7 GB のイメージが 9,710,169,862 バイト(9.04 GiB)でした。各イメージを使い、次の構成で Runtime を作成しました。
| 圧縮後サイズ | platformVersion | minimumMemoryInMiB | 結果 |
|---|---|---|---|
| 3.3 GB | V1 | なし | 作成を拒否 |
| 3.3 GB | V2 | なし | READY、呼び出し成功 |
| 3.3 GB | V2 | 8192 | READY、呼び出し成功 |
| 9.7 GB | V2 | なし | CREATE_FAILED |
| 9.7 GB | V2 | 4096 | CREATE_FAILED |
| 9.7 GB | V2 | 8192 | READY、呼び出し成功(8 vCPU / 約 32 GB) |
V1 で 3.3 GB のイメージを指定すると、作成時に次のエラーになりました。
aws: [ERROR]: An error occurred (ServiceQuotaExceededException) when calling the CreateAgentRuntime operation: maxImageSizeMb limit exceeded for account 111122223333. Please contact AWS Support for more information.
構成なしの V2 で 9.7 GB のイメージを指定したところ CREATE_FAILED になり、get-agent-runtime の failureReason は次の内容でした。
"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"
まとめ
9月にリリースされた Runtime V2 が、既定の Runtime として使われるようになったことを確認できました。
V2 では、リリース以降、メモリや CPU の強化、使えるコンテナイメージの大容量化なども行われており、新規に Runtime を作成する場合は V2 の利用をおすすめします。
V1 を前提に開発されたワークロードで V1 の Runtime が必要な場合は、作成時にプラットフォームバージョンの明示が必要である点にご留意ください。








