Four Amazon Bedrock inference choices that affect cost

AWS published guidance in the Amazon Machine Learning Blog on four choices made inside an individual Amazon Bedrock inference request that can shift the size of the bill even after prompts and application logic have been tuned: prompt cache duration, service tier, reasoning effort and the maxTokens ceiling. None of them requires swapping the model or rewriting the prompt. The post describes how each option was tested and how its effect shows up in response metadata, logs and billing data, and points to sample notebooks (Mixed TTL Caching, Tenant Isolation with Prompt Caching) and the 01-low-effort folder of a cost-management workshop repository for reproducing the work.
Every Bedrock response carries usage metadata. Input and output tokens bill at the rate of the model and tier that handled the request; cache reads and writes have their own counters, and reasoning tokens are billed as output tokens. That accounting is the foundation for everything else in the post.
The prompt cache guidance lists a 5-minute and a 1-hour time-to-live for supported Anthropic models, plus a 30-minute minimum for supported GPT-5.6 models, with support and API fields varying by model. Explicit caching is requested through a cachePoint object in the Converse API with a ttl value of "1h", or through cache_control in InvokeModel for Anthropic models. Implicit caching, which tries to reuse eligible prefixes without any cache control, is best effort and not guaranteed, so the TTL decisions apply to explicit entries.
Longer is not automatically cheaper. For Claude Sonnet 5 and Claude Opus 5 on Bedrock, a 5-minute write costs 1.25 times the input rate, a 1-hour write 2 times, and a cache read 0.1 times. A 5-minute entry breaks even on the first reuse inside five minutes. If the same prefix recurs with gaps longer than five minutes, it is rewritten at 1.25 times each time, and the 1-hour entry becomes the cheaper option from the second request within the hour. To beat no caching at all, the 1-hour cache needs three requests an hour. AWS recommends staying on the 5-minute default for frequent reuse and moving up only when a prefix recurs at least twice an hour with gaps beyond five minutes.
Cache mechanics have traps. Stable content should precede dynamic content, requests must meet the model's checkpoint minimum, and caching only works with on-demand inference, not batch. Checkpoints are checked in the order tools, system, messages, so editing an earlier section invalidates later ones; the post reports six calls on Claude Sonnet 5 with a 1-hour checkpoint where one system-prompt change and one tool-definition change each produced zero cache reads and a fresh write. Versioning prompts that change often gives each version its own entry. Cache entries are scoped to an AWS account and Region rather than to tenants, so multi-tenant applications are advised to prefix the cacheable content with a tenant-specific SHA-256 hash and to authorize the tenant before building the prompt. For regulated workloads needing a hard data boundary, AWS suggests separate accounts.
The Flex service tier is aimed at latency-tolerant work such as background jobs, evaluation harnesses, nightly summarization and backfills. It is selected with serviceTier type "flex"; the Standard tier is requested with "default" (or by omitting the field), not "standard". Support is per model version: the Nova 2 Lite and OpenAI gpt-oss-120b model cards list Flex, while Claude Sonnet 5 and Opus 5 on Bedrock do not. An unsupported request fails with a ValidationException rather than silently falling back, and AWS's own Sonnet 5 attempt returned that error. The advice is to retry once with default only if policy permits Standard as a fallback, not to retry every ValidationException since malformed requests raise the same error, and to depend on the SDK's bounded retry for throttling. Flex requests should carry an application deadline, and a supported response reports the resolved tier, which is also visible in CloudWatch as ResolvedServiceTier.
In a test on Nova 2 Lite, 200 default and 200 flex requests were sent in interleaved pairs. Token counts matched, all 400 resolved to the requested tier, and the median latency difference was too small to separate from noise. At publication the Flex rate for Nova 2 Lite in us-west-2 was half the Standard rate and the bill matched.
Reasoning tokens are the third lever. Claude Sonnet 5 and Opus 5 default to adaptive thinking at high effort even when the thinking field is absent, so an application moved from Sonnet 4.6 unchanged begins paying for thinking tokens, and maxTokens now caps thinking plus response text. Claude Haiku 5.5 defaults to medium. All three support low, medium, high, xhigh and max, set via output_config.effort with thinking type "adaptive".
On a three-task tool-calling agent on Opus 5, each run eight times per level, all 24 runs per level were correct, and median output tokens were 936 at low, 1,484 at medium (+59%), 2,521 at high (+169%), 2,964 at xhigh (+217%) and 3,762 at max (+302%). A code-generation sample told a different story: 676 median output tokens at low against 743 at high, within run-to-run variation, with graded programs passing at every level. This suggests the saving is workload-dependent, so lowering effort is safe only where a pass-rate test says it is. AWS recommends starting below high for routine, well-bounded tasks and keeping high where quality checks demand it, judged with per-request output-token counts, CloudWatch OutputTokenCount, invocation logs and task pass rates.
Finally, maxTokens acts as an application output ceiling rather than a safety control; Guardrails is named as the responsible-AI control for filtering content, detecting prompt attacks and checking grounding. Because Bedrock deducts input tokens plus maxTokens when a request starts, an oversized value reduces concurrency. In a Sonnet 5 test, five normal outputs peaked at 103 tokens, so an illustrative 155-token fence was set; a deliberately verbose prompt then produced 2,048 tokens under a 2,048 ceiling versus 155 under the fence, avoiding 1,893 output tokens, though both responses were truncated. Truncation can break downstream steps in multi-turn or agentic chains. AWS advises calibrating from P95 or P99 per task type with headroom, calibrating with thinking enabled, and investigating max_tokens stops before raising a limit. For teams routing across models, the post recommends a capability record per model version, Region and API covering cache TTLs, tiers, effort levels and ceilings, checked before each request.
Why it matters: Developers running Bedrock workloads inherit defaults they did not pick — high adaptive thinking on Opus 5 and Sonnet 5, Standard-tier latency, and the 5-minute cache — so a post-migration cost jump may be configuration rather than usage growth. Product teams should treat effort levels, cache TTL and tier support as per-model configuration to test and monitor, since the AWS numbers show multi-fold output-token differences on agent tasks. A likely trade-off, in my reading, is that the cheapest setting is also the one most likely to truncate or degrade a chain, making pass-rate telemetry as important as the bill.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Your Amazon Bedrock inference bill can keep climbing even after you tune prompts and application logic. Four request-level choices (cache duration, service tier, reasoning effort, and maxTokens) change how many tokens the service processes and the rate applied. We show how we tested each and how to verify the effect.