This guide covers Bedrock throughput provisioning with production-focused examples and trade-offs.
The worst time to discover Bedrock on-demand throttling is minute twelve of a sev-1, when every on-call is asking the incident copilot the same question. Provisioned throughput and explicit fallback models are reliability features, not cost optimization theater.
⚡ TL;DR: Put on-call and ChatOps assistants on provisioned throughput (or reserved capacity) sized to peak concurrent sev traffic. Define a fallback model ID with prompt compatibility checks. Cache identical runbook answers. Alarm on ThrottlingException before humans notice. Pair with LLM Incident Runbooks and Bedrock Prompt Caching and Batch Inference.
Size for incident concurrency, not average Tuesday — Bedrock throughput provisioning
// capacity planning — illustrative
type Workload = {
name: string;
peakConcurrentSevSessions: number;
avgInputTokens: number;
avgOutputTokens: number;
tokensPerSecondNeeded: number;
};
export function estimateModelUnits(w: Workload): number {
// Rough: peak sessions * (in+out) / seconds-per-answer
const tokensPerMin =
w.peakConcurrentSevSessions * (w.avgInputTokens + w.avgOutputTokens) *
(60 / 20); // assume ~20s per answer
// Map to model units per vendor docs; keep 2x headroom for sev-1
return Math.ceil((tokensPerMin / 10_000) * 2);
}
const onCallAssistant: Workload = {
name: "sev-copilot",
peakConcurrentSevSessions: 25,
avgInputTokens: 6_000,
avgOutputTokens: 1_200,
tokensPerSecondNeeded: 0, // derived
};
❌ One shared on-demand quota for marketing chatbots and sev copilots.
Fallback chain that preserves prompt contracts
import {
BedrockRuntimeClient,
ConverseCommand,
ThrottlingException,
} from "@aws-sdk/client-bedrock-runtime";
const PRIMARY = process.env.BEDROCK_PRIMARY_PROFILE!; // provisioned
const FALLBACK = process.env.BEDROCK_FALLBACK_MODEL!; // on-demand smaller
export async function converseResilient(input: {
messages: any[];
system: any[];
}) {
const client = new BedrockRuntimeClient({});
try {
return await client.send(new ConverseCommand({
modelId: PRIMARY,
messages: input.messages,
system: input.system,
}));
} catch (e) {
if (!(e instanceof ThrottlingException)) throw e;
metrics.increment("bedrock.throttle.primary");
// ✅ Fallback only if prompt features intersect (tools, JSON mode)
assertPromptCompatible(PRIMARY, FALLBACK);
return await client.send(new ConverseCommand({
modelId: FALLBACK,
messages: input.messages,
system: input.system,
// optionally drop tools that fallback cannot support
}));
}
}
Cache runbooks; do not re-generate identical answers
import { createHash } from "node:crypto";
function cacheKey(question: string, runbookSha: string) {
return createHash("sha256")
.update(normalize(question) + ":" + runbookSha)
.digest("hex");
}
// During sev-1, 10 engineers ask "how do we failover payments redis?"
// Serve the cached grounded answer keyed by runbook SHA.
Alarms that page before the throttle bites users
# CloudWatch — illustrative
AlarmName: bedrock-oncall-throttles
MetricName: ThrottlingException
Namespace: Bedrock/OnCallAssistant
Threshold: 5
Period: 60
EvaluationPeriods: 2
AlarmActions: [sns:sev-paging]
Closing checklist
- [ ] On-call / ChatOps path uses provisioned throughput or reserved capacity
- [ ] Peak sev concurrency modeled with ≥2x headroom
- [ ] Fallback model declared with prompt/tool compatibility checks
- [ ] Runbook answer cache keyed by normalized question + doc SHA
- [ ] Alarms on throttles and provisioned utilization
- [ ] IDE traffic isolated from sev inference profiles
Related reading
- LLM Incident Runbooks: Ground On-Call Answers in CloudWatch Signals
- Bedrock Prompt Caching and Batch Inference: Cut Latency and Cost
- LLM Cost Controls: Token Budgets Per PR and Per Engineer
- Bedrock Converse API: Tool Choice Modes for Production Coding Agents
Related: Lambda X-Ray Sampling: Cost Versus Debuggability During Incidents · Day 56: Supervisor Patterns on Bedrock Agents · SageMaker JumpStart vs Bedrock: When Fine-Tunes Beat Prompting
Related: Day 37: Provisioned Throughput vs On-Demand Cliffs · Amazon Bedrock Agents: Tool Use, Memory, and Production Guardrails · AppSync With Bedrock: GraphQL Resolvers That Call Tools Safely
Watch: 100 Days of AI on YouTube
Short videos from CheatCoders, one AI engineering topic per day.
Most viewed
- Python Decorators Explained: From Simple Wrappers to Production Patterns
- Claude Code vs Cursor vs GitHub Copilot: Choose by Workflow, and Set Up One Repo That Works With All Three
- AI Agent Frameworks in 2025: LangGraph vs CrewAI vs AutoGen vs Raw API
- Python String Methods: Every str Method With Real Production Examples
- Css Animation Performance: Performance-Optimized Motion for Modern UIs
Newly added
- AWS Systems Manager Parameter Store: Hierarchical Runtime Config for Coding Agents
- Amazon Cognito Identity Pools: Federate Coding-Agent Tool Callers Without Long-Lived Keys
- Amazon Athena for Coding Agents: Query Tool Audit Logs and Eval Traces on S3 Without a Warehouse
- AWS Batch for Coding Agents: Parallel Overnight PR Reviews and Long-Running Jobs Without Lambda Timeouts
- Amazon Bedrock Prompt Management: Version and A/B Test Coding-Agent System Prompts
Deep-dive PDF
Get the expanded guide for this post — extra diagrams-style checklists, failure modes, and a production walkthrough. Free when you subscribe to CheatCoders.
Already subscribed? or open the subscribe page.
Discover more from CheatCoders
Subscribe to get the latest posts sent to your email.
