When Do AgentCore Runtime Instances Cost Less?

Meter AgentCore Runtime and Code Interpreter separately, then calculate how many verified results would cover a Runtime Instance’s monthly cost. Check that the instance can meet that volume before switching.

Reconcile costs against verified results

Use one batch of identical inputs to compare serverless AgentCore Runtime and Runtime Instances. Give each input a workload ID and count it once when its output passes verification. Charge every attempt to that batch, including retries and jobs that failed after invoking Code Interpreter. Record the Runtime and interpreter meters in separate rows, using the billing unit attached to each rate. For instance hosting, add the EC2 configuration and any applicable management fee for the hours you plan to keep capacity available. In an illustrative run, $18 spent on 90 verified outputs costs $0.20 per output, even if 120 attempts ran. If the two hosting paths invoke the interpreter at different rates, price that difference before using a break-even that assumes equal interpreter spend.

Amazon Bedrock AgentCore Pricing - AWS

Measure how often retries repeat interpreter work

A deployment can look cheaper in a clean benchmark and cost more when an output must survive a retry. Use a synthetic job that creates a report with a known row count and checksum. In the first run, save the verified report to your application’s durable output destination before reporting success. In the second, withhold the save and terminate the interpreter session before retrying. Start each retry in a fresh session. Record whether it reuses the committed report, reruns the interpreter, or returns an incomplete result. Compare billable meter totals and verified output counts across both runs. The documented session default is 900 seconds, and the session filesystem is cleaned up at termination. Measure the share of jobs that redo paid work and include those attempts in the pricing batch.

Session management - Amazon Bedrock AgentCore

Trace each job to the service that runs it

Use AgentCore Runtime for the deployed agent and add a Code Interpreter line when it invokes that managed tool. AWS documents that Code Interpreter can augment an agent runtime to execute code, so a job can involve both services. Record the Runtime platform version and whether you are evaluating microVM consumption pricing or Runtime Instances. If a job only needs code execution, test a direct Code Interpreter integration as a separate candidate.

Give every test job a correlation ID. Record the Runtime session, any interpreter sessions, model calls, and the time the final artifact becomes available. During reconciliation, require every tool execution to map to a tool session and every completed job to have a recorded outcome. An interpreter invocation with no corresponding cost estimate is a gap to investigate.

Resource and session management - Amazon Bedrock AgentCore

Work the arithmetic before comparing versions

For an illustrative comparison, assume each of 3,600 jobs uses 10 vCPU-seconds and accumulates 40 billable GB-seconds on each version. That is 10 vCPU-hours and 40 GB-hours in total. At hypothetical rates of $0.10 per vCPU-hour and $0.01 per GB-hour, one candidate costs $1.40. At hypothetical rates of $0.13 and $0.02 for the same units, the other costs $2.10. Price any Code Interpreter sessions independently.

Replace those inputs with rates from AWS AgentCore Pricing for the actual version and pricing mode. Confirm the memory billing rule, minimums, and treatment of idle time for each version, then use version-specific usage from your pilot. For Runtime Instances, verify regional EC2, storage, and transfer charges and the applicable management fee instead of applying the microVM formula.

Amazon Bedrock AgentCore Pricing - AWS

Tie interpreter lifetime to the artifact

Code Interpreter files are available during the session, and AWS says the data is cleaned up when the session terminates. Assign the caller responsibility for exporting the output. Once the last tool call succeeds, copy the artifact to your chosen durable destination, verify that it opens there, and then stop the interpreter session. Keep a timeout for sessions the caller abandons.

In an illustrative test, the agent generates a report in 25 seconds and the caller tries to retrieve it three minutes later. Compare exporting and closing immediately with retaining the session until retrieval. Track time from final tool result to termination, readable artifact count, and repeat execution. If early termination loses the report, fix the export sequence before shortening the timeout further.

Session management - Amazon Bedrock AgentCore

Sources