Storage is blocked in this browser, so progress will not be saved. Everything else still works.
Section · linked from Module 6
Claude on Amazon Bedrock: an SRE field guide
The SRE view of calling Claude through AWS instead of the Anthropic API. Every fact links the AWS or Anthropic page it came from, opened Nov 26, 2026. Starting thresholds without a source are labeled estimate.
Scope: this covers the bedrock-runtime endpoint (InvokeModel and Converse). AWS also documents a bedrock-mantle endpoint, and Anthropic documents a separate "Claude in Amazon Bedrock" Messages endpoint. They have their own quotas, and invocation logging doesn't capture bedrock-mantle calls. These docs change often; re-read them before relying on any detail.
Invocation paths
- InvokeModel sends the model's own request body; for Claude that is the Anthropic Messages format. InvokeModelWithResponseStream is its streaming form.
- Converse gives one request shape across models; ConverseStream is its streaming form.
- Errors before the response starts come back as HTTP errors: AccessDeniedException 403, ValidationException 400, ResourceNotFoundException 404, ModelTimeoutException 408, ModelErrorException 424, ThrottlingException 429, InternalServerException 500, ServiceUnavailableException 503. InvokeModel and its stream also list ServiceQuotaExceededException 400.
- Errors after streaming starts arrive as events inside the stream: throttlingException, modelStreamErrorException, serviceUnavailableException, internalServerException and validationException (InvokeModelWithResponseStream also lists modelTimeoutException). The HTTP status was already a success, so your code has to handle these events.
- Denying
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamalso denies the Converse actions on the same model.
Sources: InvokeModel needs internet, InvokeModelWithResponseStream needs internet, Converse needs internet, ConverseStream needs internet
Quotas and throttling
- Model inference is controlled by token quotas. The AWS quota list shows per-model, per-Region tokens per minute and requests per minute quotas; there is also a tokens-per-day quota.
- Reservation, not usage: at the start of each request Bedrock deducts input tokens +
max_tokensfrom your quota, and throttles if that exceeds it. Unused tokens come back at the end. - Output burndown: output tokens count several times toward the quota, depending on the model; for example 5x for Anthropic models version 4.7 and below. You're billed only for actual tokens.
- ThrottlingException (429) means the request exceeded your account's quotas. AWS recommends retries with exponential backoff and random jitter.
- Your account's quotas may be lower than the listed defaults, and increases aren't granted automatically; you request them through Service Quotas, AWS Support or your account manager.
- AWS SDK retries: standard mode is the default, with max attempts 3 (1 request + up to 2 retries) and longer backoff for throttling errors. Adaptive mode adds a client-side rate limiter. As in Module 4, don't add an app-level retry loop on top.
Sources: Quotas needs internet, How tokens are counted needs internet, Quota list needs internet, Error codes needs internet, SDK retry behavior needs internet
Cross-region inference
- Cross-region inference routes requests to compute in other Regions through an inference profile.
- Geographic profiles keep processing within a geography (such as US, EU or APAC). AWS recommends them for data-residency requirements.
- Global profiles route to any supported commercial Region worldwide. AWS lists them at approximately 10% savings; Anthropic's page describes regional endpoints as carrying a 10% premium over global ones for newer models.
- Requests can be routed to Regions you haven't enabled in your account. Data stays on the AWS network and is encrypted in transit.
- CloudTrail logs every cross-region request in your source Region; the
additionalEventData.inferenceRegionfield shows where it was processed. - SCPs must allow the destination Regions (for global profiles,
aws:RequestedRegion"unspecified"). Inference profiles don't support Provisioned Throughput.
Sources: Cross-Region inference needs internet, Anthropic: Claude on Bedrock needs internet
On-demand vs provisioned throughput
- On-demand: pay per token, bounded by your account quotas.
- Provisioned Throughput: billed hourly for a number of Model Units (MUs), each giving a set input and output tokens per minute. Required for custom models.
- Commitment options are none, 1 month or 6 months. Longer terms are discounted, a committed term can't be deleted early, and billing continues until you delete it.
- For predictable, sustained throughput, AWS's throttling guidance points to Reserved Tier (through your AWS account team) or Provisioned Throughput, where the model supports them.
Opinion
On-demand fits spiky or early traffic. Provisioned fits a steady load you can measure, because idle MUs still bill by the hour. Decide from a few weeks of InputTokenCount and OutputTokenCount, not a guess.
Sources: Provisioned Throughput needs internet, Error codes (ThrottlingException) needs internet
Observability
CloudWatch metrics in the AWS/Bedrock namespace:
| Metric | What it counts |
|---|---|
| Invocations | Accepted requests, including ones that later failed. Excludes throttled requests. |
| InvocationLatency | Time from request to last token. |
| TimeToFirstToken | Time to the first token, for streaming calls. |
| InvocationClientErrors | Client-side errors, including requests rejected for exceeding a service quota (not counted as throttles). |
| InvocationServerErrors | AWS server-side errors. |
| InvocationThrottles | Throttled requests. Not in the three metrics above, and the count depends on your SDK retry settings. |
| InputTokenCount / OutputTokenCount | Tokens in and out. |
| EstimatedTPMQuotaUsage | An approximation of quota use. AWS says not to use it as the only signal for quota or capacity planning. |
- Model invocation logging is off by default. Turned on, it collects full request and response data to CloudWatch Logs or S3 in the same account and Region, and keeps logging until you delete the configuration.
- Delivery has its own metrics, for example ModelInvocationLogsS3DeliveryFailure. Alert on those too.
- Why protect the logs: they hold the prompts and responses themselves, which can include customer data.
- Dynatrace: if your Dynatrace setup ingests these CloudWatch metrics, build the SLI as (Invocations − ClientErrors − ServerErrors) / (Invocations + Throttles), since throttles aren't counted in Invocations. estimate
Sources: CloudWatch metrics needs internet, Model invocation logging needs internet
Guardrails, PrivateLink, IAM and cost
- Guardrails filter inputs and outputs: content filters, denied topics and sensitive-information filters. AWS's own example is a banking app blocking queries or answers that amount to illegal investment advice. In Converse, a block shows up as
stopReason: guardrail_intervened. - PrivateLink: an interface VPC endpoint (
com.amazonaws.region.bedrock-runtime) lets instances without public IPs reach Bedrock privately. Add an endpoint policy to limit what can be called through it. - Least-privilege IAM: allow
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamonly on the model, inference-profile or provisioned-model ARNs a workload needs. To block a model completely, deny those two actions; that also blocks Converse. The same policy can be used as an SCP across an organization. - Cost tracking: create an application inference profile with tags, and activate those tags as cost allocation tags in Billing, so each app or team gets its own cost line.
Sources: Guardrails needs internet, Converse stopReason needs internet, VPC endpoints needs internet, IAM examples needs internet, Application inference profiles needs internet, Tagging needs internet
Failure-mode table
| Failure | Symptom | First check | Starting threshold |
|---|---|---|---|
| Throttling surge | ThrottlingException 429; InvocationThrottles up | Quota in Service Quotas; max_tokens sizes; stacked retry layers | Ticket: any throttles for 15 min. Page: throttles over 1% of requests for 5 min estimate |
| Model access not in place | AccessDeniedException 403, often on first calls to a new model | Marketplace permissions, the Anthropic first-time-use form for older models, payment method, SCPs | Page on any 403 after a deploy or model change estimate |
| Regional capacity | ServiceUnavailable 503 or overloaded_error 529; InvocationServerErrors up | The AWS Region's health; whether a cross-region profile is in use | Page: server errors over 1% for 5 min estimate |
| Stream breaks mid-response | Partial answers; error events such as modelStreamErrorException after a 200 | Client and proxy idle timeouts; TimeToFirstToken vs InvocationLatency | Ticket: incomplete streams over 0.5% of streams in an hour estimate |
| Guardrail block | stopReason guardrail_intervened; users see refusals | Whether the guardrail version changed recently | Ticket: intervention rate double its baseline week estimate |
Symptoms come from the error-code guide needs internet, the model access page needs internet and the API references above. Every threshold is an estimate to tune.
Side-by-side with the Anthropic API
| Situation | Anthropic API | Bedrock (bedrock-runtime) |
|---|---|---|
| Over your limit | 429 rate_limit_error, usually with retry-after | 429 ThrottlingException: exceeded account quotas |
| Provider busy | 529 overloaded_error | 503 ServiceUnavailable, or 529 overloaded_error; both are capacity, not your quota |
| Spend cap | 429 with error_code enforced_spend_limit_reached; don't retry | Billed through AWS. I found no matching error in the pages I read: I don't know. |
| Quota unit | Requests, input tokens and output tokens per minute | Tokens and requests per minute and tokens per day; reserves input + max_tokens; output burndown |
| SDK retries | 2 retries (3 attempts); retry-after, else 0.5 to 8 s backoff | Standard mode: 3 attempts total, backoff with jitter, longer for throttling |
| ID for support | request-id header | The AWS request ID, plus model ID, Region and approximate time |
| Access | API key | IAM permissions plus an automatic Marketplace subscription on first use |
| Features | Full Anthropic feature set | Some features missing, for example the Files API, server-side tools and Message Batches |
Sources: Claude API errors needs internet, Claude rate limits needs internet, Bedrock error codes needs internet, Bedrock token counting needs internet, AWS SDK retries needs internet, Anthropic: Claude on Bedrock needs internet. See also the Claude users playbook.
Regulated angle
- Data residency under cross-region routing: a global profile can process requests in any supported commercial Region, including ones you haven't enabled. Geographic profiles and CloudTrail's
inferenceRegionfield are the levers and the evidence. Verify with your compliance team. - Prompts in logs: invocation logging stores full prompts and responses, which may hold customer data. Decide the destination's encryption (for example SSE-KMS on the S3 bucket), access and retention before turning it on. Verify with your compliance team.
- Change control for model and guardrail versions: a new model ID or guardrail version changes behaviour like a code deploy. Pin both, and change them through a reviewed pull request with the plan attached (Module 5). Verify with your compliance team.
Study notes, not legal or compliance advice. Kept generic: no account IDs, resource names or any organization's setup.