Getting Started

Your First Claude Call on Amazon Bedrock

If your organization already lives on AWS, this is the shortest path from "we should try Claude" to a real model response — no new vendor, no new API key.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Amazon Bedrock is AWS's managed service for foundation models, and it is how most AWS-centric enterprises first meet Claude. There is no Anthropic account involved: access, permissions, and billing all run through AWS. This guide takes you from an ordinary AWS account to a working Python response. Budget fifteen minutes, most of it waiting on the console.

What you need before you start

Three prerequisites, all standard AWS hygiene:

An AWS account with Bedrock model access enabled. In the AWS console, Bedrock has a model-access section where an administrator enables the Anthropic models for your account. In many organizations this is gated by a cloud platform team, so file that request first — it is the step most likely to involve waiting on another human.

An IAM identity allowed to invoke models. Whoever runs the code needs IAM permissions covering Bedrock model invocation. For a first experiment, your platform team can scope this to the specific Claude models rather than granting broad Bedrock access — a habit worth starting on day one.

Working AWS credentials on your machine. If aws sts get-caller-identity succeeds in your terminal, you are ready. The SDK picks up credentials the standard AWS way — environment variables, a shared credentials file, or an assumed role. No API key is created anywhere in this process.

Install the SDK and make the call

Claude on Bedrock uses Anthropic's official Python SDK with a Bedrock-specific extra:

pip install -U "anthropic[bedrock]"

Then the whole first call fits in a dozen lines. Note the model ID: Bedrock is the only platform that prefixes Claude model IDs with anthropic. — everywhere else the bare ID is used.

from anthropic import AnthropicBedrockMantle

client = AnthropicBedrockMantle(aws_region="us-east-1")

message = client.messages.create(
    model="anthropic.claude-sonnet-5",
    max_tokens=512,
    messages=[
        {"role": "user", "content": "In one sentence, what does Amazon Bedrock do?"}
    ],
)
print(message.content[0].text)

Run it, and you should see a one-sentence answer printed to your terminal. That response came from Claude Sonnet 5 running inside AWS, authorized by your IAM identity, and metered onto your AWS bill.

If it fails, it is almost always one of three things: model access not yet enabled in the Bedrock console, IAM permissions missing the invoke action, or a region mismatch — the aws_region you pass must be a region where your organization has enabled the model. Check those three before anything else.

Reading what you got back

The response object is worth thirty seconds of attention beyond the printed text. It includes usage figures — how many input tokens your request consumed and how many output tokens Claude produced. Those two numbers are the entire basis of your bill, so get in the habit of logging them from the very first script. It also records exactly which model responded, which matters later when you pin versions for production.

Two knobs in the request deserve early experimentation: max_tokens caps how long the response can be (and therefore its cost), and the model ID selects the tier. Swapping anthropic.claude-sonnet-5 for anthropic.claude-haiku-4-5-20251001-v1:0 gives you a faster, cheaper model; anthropic.claude-opus-4-8 gives you the most capable one. Same code, different line item.

When the toy script works, the natural next iteration is streaming — receiving the response incrementally rather than waiting for the whole thing — which the same SDK supports on Bedrock and is the default choice for anything user-facing. That, plus moving the region and model ID into configuration instead of the script body, turns your fifteen-minute experiment into the skeleton of something production-shaped.

What Bedrock does and doesn't give you

Everything core works here: streaming, tool use, vision, extended thinking, prompt caching. Know the gaps too — the Batch API, Files API, code execution tool, web fetch tool, and web search tool are not available on Bedrock as of July 2026. For interactive apps and document processing that rarely matters; for large offline pipelines it might, and it is better to learn that in week one than in month three.

Where to go next

Understand the anthropic. prefix quirk in why model IDs differ across platforms, then check the feature gaps against your roadmap. The quickstart covers the other platforms side by side.