AWS Builder Center

I measured AgentCore Runtime V1 against V2 on the bill: 2.8x the cost for one agent, break-even for another

I deployed the same agents to AgentCore Runtime V1 and V2, ran identical load, and compared the usage metrics with the Cost Explorer bill. Includes seven steps with Terraform and Python to run the same measurement on your own agent.

Cloud engineer.
Amazon Bedrock AgentCore Runtime has two platform versions. V2 charges about 1.8 times more per GB-hour of memory than V1, and the pricing page offers this in return: "Idle memory is reclaimed automatically in Runtime v2 after 120 seconds."
I took that to mean the memory meter stops two minutes after my agent goes quiet, and I think most people read it the same way. On that reading V2 is cheaper for short, bursty sessions that sit idle until they time out, which is the advice in most of the pricing write-ups I found.
I set up an experiment to put a number on the saving, and for my agent there wasn't one: V2 cost 2.8 times as much per session. When I re-read the sentence I realised I had misunderstood it, so I built a second agent to test what it actually says. With that agent V2 metered about half the memory V1 did, which brought the two to about the same cost. This article covers both results and the bill behind them, and section 8 has the seven steps and code to run the same measurement on your own agent.

1. What AWS actually says

Here are three passages from AWS.
The developer guide, describing V2: "AgentCore Runtime reclaims memory as your agent releases it".
The pricing page's V2 example: "Memory is reclaimed within the session when unused for 120 seconds".
The third is the arithmetic in that same example. It describes a ten-minute session that spends 90% of its time waiting, and bills memory for 300 seconds at 1 GB, 150 seconds at 2 GB and 150 seconds at 2.5 GB. That adds up to 600 seconds, which is the entire session including the waiting.
So "idle memory" means memory the agent has stopped using, not the memory of a session that is idle. If your process allocates 2 GB for a tool call and frees it, V2 stops charging for it and V1 doesn't. If your process loads its libraries at startup and keeps them loaded, which is what a Python agent does between calls, there is nothing to give back, and an idle session is billed for that memory until it ends.

2. The test

I used three agents:
  • Agent A has flat memory. It's a Strands agent with one tool that adds two numbers, backed by Amazon Nova Micro, at 946 input and 63 output tokens per call. It loads its libraries and holds them.
  • Agent B has spiky memory. It has no framework and no model. Each call allocates 1 GB, holds it for five seconds, frees it, and reports its own process memory before, at peak and after.
  • Agent C is empty and returns its input. It's a control for how much the platform meters when the code does nothing.
All three are deployed as zips (direct code deploy, Python 3.13, arm64) to both V1 and V2, in us-east-1, on consumption billing, with identical settings apart from  platformVersion .
Load on Agent A:
  • Bursty: a new session every two minutes with three calls, after which the client stops and the session times out after the default 15 minutes. There were 105 to 109 sessions per version across two rounds.
  • Steady: one session, one call every five minutes, for about five hours.
  • Idle: one call, then nothing.
Usage comes from the  MemoryUsed-GBHours  and  CPUUsed-vCPUHours  metrics in the  AWS/Bedrock-AgentCore  namespace at one-minute resolution, and is reconciled against Cost Explorer in section 5.

3. Flat memory: V2 cost 2.8× as much

Bursty sessions


V1
V2
V2 ÷ V1
Sessions
109
105

GB-hours per session
0.254
0.376
1.5×
vCPU-seconds per call
4.6
11.7
2.5×
Cost per session
$0.0027
$0.0076
2.8×
Cost per 1,000 sessions
$2.74
$7.58

The 2.8× has three parts: 1.8× from V2's higher rate, 1.5× from a larger metered footprint, and a little from CPU.
The footprint is the part you can't get from the rate card. Each session lasted its 15-minute timeout on both versions. Averaged over that time, V1 metered about 1.0 GB per session and V2 about 1.5 GB, for the same code.
Most of the CPU figure isn't the calls. An idle session uses about 1% of a vCPU on V1 and 2% on V2, so a session that waits 15 minutes uses more CPU waiting than working.

An idle session, minute by minute

This is one call at minute zero and then nothing. Metered memory in GB:
Minute
V2
V1
1
2.26
1.29
3
2.05
1.03
5
1.79
0.93
10
1.25
0.84
15
1.21
0.81
20
1.16
0.80
Both decline over the first ten minutes and then level off, V2 at about 1.15 GB and V1 at about 0.8 GB. There is no step at 120 seconds on V2, and going by the docs there shouldn't be, because the process released nothing.
There is one thing I can't explain. The very first session on Agent A's freshly created V2 runtime didn't decline at all. It held 2.27 GB for six hours until its timeout. Every later V2 session I looked at behaved like the table above, and the first sessions on the other two agents' V2 runtimes declined normally. It's one session and I don't know the cause.

How much of that is my code?

Very little of it. This is Agent C, which does nothing:
Minute
V2
V1
1
2.03
0.82
5
1.88
0.75
10
1.50
0.71
20
1.20
0.70
30
1.05
0.70
59
1.01
0.72
An empty agent settles at about 1.0 GB on V2 and 0.7 GB on V1. Agent B reported its own process memory at 56 MB. Most of what the meter counts isn't the Python process, and V2 counts more of it.
This is in line with the one earlier measurement I know of. In September, suzuki.ryo at Classmethod read V2's per-session usage logs in ap-northeast-1 and derived a figure of about 1,292 MB at session start, roughly 39 times the process's resident memory, declining gradually and still falling at 667 seconds.
I don't know why V2 meters more for the same code. V2 restores each session from a snapshot, but whether that's related is a guess, so I'm leaving it as an open question.

4. Spiky memory: reclaim works, and V2 breaks even

This is Agent B with one call. The process reported 56 MB before, 1,081 MB at peak and 52 MB after freeing, on both versions. The session then sat idle for an hour, and I ran the whole thing twice. Metered memory in GB:
Minute
V2, run 1
V2, run 2
V1, run 1
V1, run 2
1
1.25
1.38
2.23
2.19
5
1.11
1.24
2.05
2.15
15
0.84
1.05
1.79
1.85
30
0.74
1.02
1.71
1.82
59
0.72
0.90
1.68
1.68
This is V2's reclaim working as documented. The process gave the gigabyte back and V2's meter followed it down, while V1 kept metering about 1 GB above its usual baseline for the rest of the hour.
Totals for the one-hour session:

V2, run 1
V2, run 2
V1, run 1
V1, run 2
GB-hours
0.82
1.04
1.79
1.84
vCPU-hours
0.020
0.017
0.012
0.012
Cost
$0.0164
$0.0197
$0.0180
$0.0184
V2 metered 45% to 56% of V1's memory. At 1.8 times the rate, and with somewhat more idle CPU, that comes out 9% cheaper in one run and 7% more expensive in the other, so roughly break-even.
So the reclaim is real, and for this agent it's worth about a factor of three compared with the flat-memory case, where V2 was 2.8× more expensive. On a single 1 GB spike in a one-hour session it wasn't enough to make V2 clearly cheaper.
That gives a rule of thumb. On memory alone, V2's consumption pricing wins when it meters less than about 56% of what V1 meters for the same session (1 ÷ 1.79), and V2's higher idle CPU pushes that threshold a little lower. For the flat agent V2 metered 150% of V1, and for the spiky agent 45 to 56%. An agent with larger or more frequent spikes relative to its baseline should cross the threshold, but I didn't test one.

5. The bill

Cost Explorer for 16 November, the day of the main runs, against the totals I had summed from CloudWatch for the same runtimes:
Usage type
Billed quantity
From CloudWatch
Billed cost
Runtime memory, V1 (GB-hours)
86.91
86.92
$0.82
Runtime memory, V2 (GB-hours)
56.91
56.91
$0.96
Runtime vCPU, V1 (vCPU-hours)
1.286
1.286
$0.12
Runtime vCPU, V2 (vCPU-hours)
1.235
1.235
$0.16
The usage metrics and the bill agree to within 0.01%. AWS notes that telemetry may differ from billing, but here it didn't. The per-session figures in sections 3 and 4 are the metric quantities priced at list rates, and they add up to these billed totals.
Rates, us-east-1:

V1
V2 (consumption)
vCPU-hour
$0.0895
$0.1276
GB-hour
$0.00945
$0.0169
From the AgentCore pricing page, confirmed against the AWS Price List and against the bill above. A 128 MB minimum applies to billed memory.

6. Cold starts

These are client-side numbers from a laptop, across both rounds:

Cold starts
Cold p50
Cold p95
Warm p50
V1
107
4.69 s
5.66 s
0.79 s
V2
103
2.57 s
3.14 s
0.83 s
V2 was about 2.1 seconds faster at the median. AWS says V2 session starts are faster and more consistent, and FactualMinds reports AWS's launch figures as a P75 of about 2 seconds on V2 against 5.4 to 30 seconds on V1. My numbers are in line with that, so if latency is why you want V2, that part held up.

7. A side result on networking

I also ran Agent A on V1 inside a VPC, once behind a NAT gateway and once with interface endpoints and no internet path.
Billed for the same 20 hours on 16 November:

NAT gateway
Endpoints only
Hourly charges
$0.90 gateway + $0.10 public IPv4
$0.80 (2 endpoints × 2 AZs)
Data
$0.14 (3.0 GB)
under $0.01
Total
$1.14
$0.80
Endpoints were cheaper, and they stay cheaper as long as you need only a few of them.
The 3.0 GB through the NAT gateway is more than I expected from about 100 sessions and 300 tiny calls. That's roughly 30 MB per session, which is the size of the agent's zip. My reading is that each new session fetches the code package through the NAT gateway. I did not confirm that directly, but the VPC documentation supports it: it says zip-deployed code is stored in a service-owned S3 bucket, and it recommends VPC endpoints even when a NAT gateway is present, specifically to avoid NAT data processing charges. An S3 gateway endpoint is free and should remove this traffic, but I didn't test that, so treat it as an inference. A dev.to post measured 659 GB through NAT in six days for an idle container-based agent, caused by warm-pool machines re-pulling the image. A zip deploy seems to have a much smaller version of the same effect.
Cold starts were unaffected by networking mode:

Cold starts
Cold p50
Cold p95
Public
107
4.69 s
5.66 s
VPC + NAT gateway
101
4.58 s
5.73 s
VPC + endpoints only
101
4.58 s
5.44 s
The AgentCore VPC documentation notes, in its monitoring guidance, that "VPC connectivity may increase session startup times", but for a zip-deployed agent of this size I didn't see it.

8. How to run this measurement on your own agent

The results above are for my agents, but the same method works on any agent. It takes seven steps. The snippets are cut down from the repository linked at the end, which has the full versions.

Step 1. Pin the platform version in Terraform

Deploy the same code twice and change one field. The AWS provider's  aws_bedrockagentcore_agent_runtime  resource takes  platform_version  directly (I used provider 6.73.0):
resource "aws_bedrockagentcore_agent_runtime" "this" {
agent_runtime_name = "bill_${var.variant_id}"
role_arn = aws_iam_role.runtime.arn
platform_version = var.platform_version # "V1" or "V2", never omitted

agent_runtime_artifact {
code_configuration {
entry_point = ["main.py"]
runtime = "PYTHON_3_13"
code {
s3 {
bucket = aws_s3_bucket.code.id
prefix = aws_s3_object.code.key
}
}
}
}

network_configuration {
network_mode = "PUBLIC"
}

lifecycle_configuration {
idle_runtime_session_timeout = var.idle_timeout_seconds
max_lifetime = var.max_lifetime_seconds
}

tags = local.tags
}
Two things matter here. Set  platform_version  explicitly on every runtime, so a change in the service default cannot move your agent to a different price list. Also choose the idle timeout deliberately, because it decides how long an abandoned session keeps metering. In my bursty runs that waiting was most of the cost.
A V1 runtime is ready in seconds. A V2 runtime takes several minutes, because the service builds a snapshot first, so wait for  READY  before sending load.

Step 2. One runtime per thing you want to compare

Cost Explorer reports daily totals per usage type, and CloudWatch reports usage per runtime. Two load patterns sharing one runtime cannot be separated afterwards. So each variant gets its own runtime, in its own Terraform workspace, from the same configuration:
for V in pub_v1_bursty pub_v2_bursty; do
terraform -chdir=infra workspace select -or-create "$V"
terraform -chdir=infra apply -input=false -var-file="../build/variants/$V.tfvars.json"
terraform -chdir=infra output -json > "results/$V/outputs.json"
done
Save the outputs, because every query that follows needs the runtime ARN from that file.

Step 3. Send load you can account for

Call the runtime with boto3 and choose the session id yourself. A new id starts a new session, which is a cold start and a new microVM. Reusing an id continues the same session.
import json, time, uuid
import boto3
from botocore.config import Config

client = boto3.client(
"bedrock-agentcore",
config=Config(read_timeout=180, retries={"max_attempts": 0}),
)

session_id = str(uuid.uuid4()) # the API wants at least 33 characters; a uuid4 is 36
t0 = time.perf_counter()
resp = client.invoke_agent_runtime(
agentRuntimeArn=runtime_arn,
runtimeSessionId=session_id,
contentType="application/json",
accept="application/json",
payload=json.dumps({"prompt": "What is 2 + 3?"}).encode(),
)
body = resp["response"].read()
latency_s = time.perf_counter() - t0
Turn SDK retries off ( max_attempts: 0 ) and write one log row per call with the timestamp, session id and latency. That way one row is one attempt, and you can check your count against the  Invocations  metric. With retries on, a retried call shows up in AWS's numbers twice and in yours once.
To isolate what an idle session costs, send a single call and then nothing. To test reclaim, add a control agent that allocates memory, holds it for a few seconds and frees it. Mine uses an anonymous  mmap  and closes it, because a freed  bytearray  can stay inside the Python allocator and never go back to the operating system.

Step 4. Read metered memory minute by minute

The runtime publishes  MemoryUsed-GBHours  and  CPUUsed-vCPUHours  in the  AWS/Bedrock-AgentCore  namespace. The dimensions are  Service=AgentCore.Runtime  and  Resource=<runtime ARN> .
cw = boto3.client("cloudwatch")

def series(arn, metric, start, end):
r = cw.get_metric_data(
MetricDataQueries=[{"Id": "m", "MetricStat": {
"Metric": {"Namespace": "AWS/Bedrock-AgentCore", "MetricName": metric,
"Dimensions": [
{"Name": "Service", "Value": "AgentCore.Runtime"},
{"Name": "Resource", "Value": arn}]},
"Period": 60, "Stat": "Sum"}}],
StartTime=start, EndTime=end, ScanBy="TimestampAscending")
res = r["MetricDataResults"][0]
return dict(zip(res["Timestamps"], res["Values"]))

mem = series(runtime_arn, "MemoryUsed-GBHours", start, end)
gb_held = {t: v * 60 for t, v in mem.items()}
The unit needs some care. Each one-minute datapoint is GB-hours used in that minute, so multiplying by 60 gives the average GB held during it. That conversion is how I got the minute-by-minute tables in sections 3 and 4. Use  Sum , not  Average , and a 60-second period.
If you have one session on the runtime, this series is that session. With several overlapping sessions it is their total, which is why the idle and control tests use a single session each.

Step 5. Price it and apply the 56% test

Sum both metrics over the session and multiply by the rates for that platform version:
RATES = { # us-east-1, USD per hour
"V1": {"vcpu": 0.0895, "gb": 0.00945},
"V2": {"vcpu": 0.1276, "gb": 0.0169},
}

def session_cost(version, gb_hours, vcpu_hours):
r = RATES[version]
return gb_hours * r["gb"] + vcpu_hours * r["vcpu"]

ratio = v2_gb_hours / v1_gb_hours # same agent, same load, both versions
If  ratio  is well under 0.56, V2 is cheaper for that workload. Around 0.56 the two cost about the same, and above it V2 costs more. My flat agent came out at 1.5 and my spiky one at 0.45 to 0.56.

Step 6. Check the metrics against the bill

The metrics are telemetry, and AWS says telemetry can differ from billing. Cost Explorer is the bill, and it lags by about a day:
ce = boto3.client("ce", region_name="us-east-1")
resp = ce.get_cost_and_usage(
TimePeriod={"Start": "2026-11-16", "End": "2026-11-17"}, # End is exclusive
Granularity="DAILY",
Metrics=["UnblendedCost", "UsageQuantity"],
GroupBy=[{"Type": "DIMENSION", "Key": "SERVICE"},
{"Type": "DIMENSION", "Key": "USAGE_TYPE"}],
)
Group by  USAGE_TYPE  and V1 and V2 memory and vCPU arrive as four separate lines, each with a quantity in GB-hours or vCPU-hours. Add up your CloudWatch sums across all runtimes of one version for the same UTC day and compare them with that quantity. Mine agreed to within 0.01%, which is why I'm comfortable treating the per-session numbers in this article as billed cost.
Each Cost Explorer API request costs $0.01, so page through once and save the result to a file.

Step 7. Tear down twice

Destroy the runtimes when you are done, then check that nothing is left. Runtime log groups are created by the service, not by Terraform, so  terraform destroy  leaves them behind:
export MSYS_NO_PATHCONV=1 # Git Bash on Windows only: stops "/aws/..." being rewritten as a path
aws logs describe-log-groups \
--log-group-name-prefix "/aws/bedrock-agentcore/runtimes/" \
--query 'logGroups[].logGroupName' --output text
If a runtime was attached to a VPC, its network interfaces can stay for up to eight hours after deletion, and the subnets and security groups cannot be removed until they go. The parts that bill by the hour (NAT gateway, public IP, interface endpoints) are destroyed on the first pass. Run the destroy again the next day for the rest, and finish by listing the runtimes to confirm the list is empty.
For a public-network comparison like the one in step 1, the whole exercise costs cents. My $9.39 was mostly the NAT gateway and endpoints in section 7.

9. What I'd do

  • Measure before migrating for cost. Deploy your agent on both versions, call it once, and graph  MemoryUsed-GBHours  at one-minute resolution for 20 minutes, as in steps 1 to 5 above. If V2's GB-hours come in well below 56% of V1's, V2 is cheaper for you. Near or above it, it isn't.
  • Work out which kind of agent you have. V2's pricing suits one that loads documents, images or large tool results and then lets them go. It doesn't suit one whose memory is flat between calls.
  • Use the idle timeout to control cost on both versions. In the bursty runs almost all the memory-hours came from sessions waiting to time out, so stop sessions that are finished and shorten the timeout if your traffic allows.
  • If cold starts matter to you, V2 is worth choosing for that alone.
  • In a VPC, compare the price of endpoints with NAT, and add the free S3 gateway endpoint either way.
The advice I started from was more careful than my reading of it. The Builder Center pricing article says V2's reclaim "can offset its higher rate" for short bursty sessions, and FactualMinds, modelling 50,000 five-second turns, has V2 about 46% more expensive and describes its own figures as list-rate arithmetic. What a rate-card model can't include, mine included, is how much memory each version meters for your code. You only find that out by running it.

10. Limits

  • Three small Python agents. Another framework, language or memory pattern may behave differently.
  • Agent B is synthetic: one 1 GB allocation and one free, two sessions per version. A real agent's memory rises and falls less cleanly, and two runs that straddle break-even are not a precise estimate.
  • Short runs: two bursty rounds, one steady session, single idle and control sessions per version.
  • One Region, one deploy method (zip), consumption billing only. I did not test V2's committed-baseline rate.
  • Latency is measured from a laptop. A few calls failed client-side during network drops and are excluded.
  • Cost Explorer reports account totals by usage type. Per-variant costs are the per-runtime metric quantities at list rates, reconciled to those totals.
  • I enabled the  USAGE_LOGS  vended log type for per-second data. It delivered no records on either version, so everything here is from one-minute metrics.
  • I don't know why V2 meters a larger baseline for the same code, or why the first session on a new V2 runtime behaved differently.

11. The repository

It has all three agents, Terraform for every variant, the load driver, and the scripts that pull the metrics, the bill and the minute-by-minute timelines. Every runtime sets  platformVersion  explicitly. The developer guide, read on 16 November, says "V1 is the default" when it is omitted. Total spend was $9.39, of which about $7 was the NAT gateway and interface endpoints left running for three and a half days. The agent compute for every run in this article came to $2.20.
The AgentCore VPC documentation says that after you delete an agent its network interface "may persist in your VPC for up to 8 hours", which is the reason for the second teardown pass in step 7.

References

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article