Loading...
  • Messages
  • Managed Agents
  • Admin
Search...
⌘K
First steps
Intro to ClaudeQuickstart
Building with Claude
Features overviewUsing the Messages APIHandling stop reasons
Model capabilities
Extended thinkingAdaptive thinkingEffortTask budgets (beta)Fast mode (beta: research preview)Structured outputsCitationsStreaming MessagesBatch processingSearch resultsStreaming refusalsMultilingual supportEmbeddings
Tools
OverviewHow tool use worksTutorial: Build a tool-using agentDefine toolsHandle tool callsParallel tool useTool Runner (SDK)Strict tool useTool use with prompt cachingServer toolsTroubleshootingWeb search toolWeb fetch toolCode execution toolAdvisor toolMemory toolBash toolComputer use toolText editor tool
Tool infrastructure
Tool referenceManage tool contextTool combinationsTool searchProgrammatic tool callingFine-grained tool streaming
Context management
Context windowsCompactionContext editingPrompt cachingToken counting
Working with files
Files APIPDF supportImages and vision
Skills
OverviewQuickstartBest practicesSkills for enterpriseSkills in the API
MCP
Remote MCP serversMCP connector
Claude on cloud platforms
Amazon BedrockAmazon Bedrock (legacy)Claude Platform on AWSMicrosoft FoundryVertex AI
Log in
Amazon Bedrock (legacy)
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Solutions

  • AI agents
  • Code modernization
  • Coding
  • Customer support
  • Education
  • Financial services
  • Government
  • Life sciences

Partners

  • Amazon Bedrock
  • Google Cloud's Vertex AI

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Company

  • Anthropic
  • Careers
  • Economic Futures
  • Research
  • News
  • Responsible Scaling Policy
  • Security and compliance
  • Transparency

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Help and security

  • Availability
  • Status
  • Support
  • Discord

Terms and policies

  • Privacy policy
  • Responsible disclosure policy
  • Terms of service: Commercial
  • Terms of service: Consumer
  • Usage policy
Messages/Claude on cloud platforms

Claude on Amazon Bedrock (legacy)

The legacy Amazon Bedrock integration for Claude models, using InvokeModel and Converse APIs with ARN-versioned model identifiers.

This page covers the legacy Amazon Bedrock integration: the InvokeModel and Converse APIs with ARN-versioned model identifiers and AWS event-stream encoding. For models available on the Messages-API Bedrock endpoint, see Claude in Amazon Bedrock, which uses the Messages API at /anthropic/v1/messages with SSE streaming. For an Anthropic-operated alternative with AWS Marketplace billing and typically same-day feature access, see Claude Platform on AWS. Existing Bedrock users can follow the migration guide.

Calling Claude through Bedrock slightly differs from how you would call Claude on the Claude API directly. This guide walks you through completing an API call to Claude on Bedrock using one of Anthropic's client SDKs.

Note that this guide assumes you have already signed up for an AWS account and configured programmatic access.

Install and configure the AWS CLI

  1. Install a version of the AWS CLI at or newer than version 2.13.23
  2. Configure your AWS credentials using the AWS configure command (see Configure the AWS CLI) or find your credentials by navigating to "Command line or programmatic access" within your AWS dashboard and following the directions in the popup modal.
  3. Verify that your credentials are working:
AWS CLI
aws sts get-caller-identity

Install an SDK for accessing Bedrock

Anthropic's client SDKs support Bedrock. You can also use an AWS SDK like boto3 directly.

Accessing Bedrock

Subscribe to Anthropic models

Go to the AWS Console > Bedrock > Model Access and request access to Anthropic models. Note that Anthropic model availability varies by region. See AWS documentation for latest information.

API model IDs

Claude Opus 4.7 is reachable through InvokeModel on bedrock-runtime. These requests are served by the same infrastructure as the Claude in Amazon Bedrock endpoint. For the native Messages API request shape and full feature parity, use that page. Claude Opus 4.7 is omitted from the model table on this page because it does not have an ARN-versioned model ID.

ModelBase Bedrock model IDglobaluseujpapac
Claude Opus 4.6anthropic.claude-opus-4-6-v1YesYesYesYesYes
Claude Sonnet 4.6anthropic.claude-sonnet-4-6YesYesYesYesNo
Claude Sonnet 4.5anthropic.claude-sonnet-4-5-20250929-v1:0YesYesYesYesNo
Claude Sonnet 4 ⚠️anthropic.claude-sonnet-4-20250514-v1:0YesYesYesNoYes
Claude Sonnet 3.7 ⚠️anthropic.claude-3-7-sonnet-20250219-v1:0NoYesYesNoYes
Claude Opus 4.5anthropic.claude-opus-4-5-20251101-v1:0YesYesYesNoNo
Claude Opus 4.1anthropic.claude-opus-4-1-20250805-v1:0NoYesNoNoNo
Claude Opus 4 ⚠️anthropic.claude-opus-4-20250514-v1:0NoYesNoNoNo
Claude Haiku 4.5anthropic.claude-haiku-4-5-20251001-v1:0YesYesYesNoNo
Claude Haiku 3.5 ⚠️anthropic.claude-3-5-haiku-20241022-v1:0NoYesNoNoNo

For more information about regional vs global model IDs, see the Global vs regional endpoints section below.

List available models

The following examples show how to print a list of all the Claude models available through Bedrock:

import boto3

bedrock = boto3.client(service_name="bedrock")
response = bedrock.list_foundation_models(byProvider="anthropic")

for summary in response["modelSummaries"]:
    print(summary["modelId"])

Making requests

The following examples show how to generate text from Claude on Bedrock:

from anthropic import AnthropicBedrock

client = AnthropicBedrock(
    # Authenticate by either providing the keys below or use the default AWS credential providers, such as
    # using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables.
    aws_access_key="<access key>",
    aws_secret_key="<secret key>",
    # Temporary credentials can be used with aws_session_token.
    # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
    aws_session_token="<session_token>",
    # aws_region changes the aws region to which the request is made. By default, the SDK reads AWS_REGION,
    # and if that's not present, defaults to us-east-1. Note that the SDK does not read ~/.aws/config for the region.
    aws_region="us-west-2",
)

message = client.messages.create(
    model="global.anthropic.claude-opus-4-6-v1",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello, world"}],
)
print(message.content)

See the client SDKs for more details, and the official Bedrock documentation.

Bearer token authentication

You can authenticate with Bedrock using bearer tokens instead of AWS credentials. This is useful in corporate environments where teams need access to Bedrock without managing AWS credentials, IAM roles, or account-level permissions.

Bearer token authentication is supported in the C#, Go, and Java SDKs. The PHP, Python, TypeScript, and Ruby SDKs use AWS SigV4 signing only.

The simplest approach is to set the AWS_BEARER_TOKEN_BEDROCK environment variable, which each SDK detects automatically when resolving credentials from the environment.

To provide a token programmatically:

using Anthropic.Bedrock;
using Anthropic.Models.Messages;

var client = new AnthropicBedrockClient(
    new AnthropicBedrockApiTokenCredentials
    {
        BearerToken = "your-bearer-token",
        Region = "us-west-2",
    }
);

var response = await client.Messages.Create(new MessageCreateParams
{
    Model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
    MaxTokens = 1024,
    Messages = [new() { Role = Role.User, Content = "Hello!" }],
});

Activity logging

Bedrock provides an invocation logging service that allows customers to log the prompts and completions associated with your usage.

Anthropic recommends that you log your activity on at least a 30-day rolling basis in order to understand your activity and investigate any potential misuse.

Turning on this service does not give AWS or Anthropic any access to your content.

Feature support

For all currently supported features on Bedrock, see Features overview.

PDF support on Bedrock

PDF support is available on Bedrock through both the Converse API and InvokeModel API. For detailed information about PDF processing capabilities and limitations, see Amazon Bedrock PDF support.

Important considerations for Converse API users:

  • Visual PDF analysis (charts, images, layouts) requires citations to be enabled
  • Without citations, only basic text extraction is available
  • For full control without forced citations, use the InvokeModel API

Context window

Claude Opus 4.6 and Claude Sonnet 4.6 have a 1M-token context window on Amazon Bedrock. Other Claude models, including Sonnet 4.5 and Sonnet 4 (deprecated), have a 200k-token context window.

Bedrock limits request payloads to 20 MB. When sending large documents or many images, you may reach this limit before the token limit.

Global vs regional endpoints

Starting with Claude Sonnet 4.5 and all future models, Bedrock offers two endpoint types:

  • Global endpoints: Dynamic routing for maximum availability
  • Regional endpoints: Guaranteed data routing through specific geographic regions

Regional endpoints include a 10% pricing premium over global endpoints.

This applies to Claude Sonnet 4.5 and future models only. Older models (Claude Sonnet 4 (deprecated), Opus 4 (deprecated), and earlier) maintain their existing pricing structures.

When to use each option

Global endpoints (recommended):

  • Provide maximum availability and uptime
  • Dynamically route requests to regions with available capacity
  • No pricing premium
  • Best for applications where data residency is flexible

Regional endpoints (CRIS):

  • Route traffic through specific geographic regions
  • Required for data residency and compliance requirements
  • Available for US, EU, Japan, and Asia-Pacific
  • 10% pricing premium reflects infrastructure costs for dedicated regional capacity

Implementation

Using global endpoints (default for Opus 4.6, Sonnet 4.6, and Sonnet 4.5):

The model IDs for Claude Opus 4.6, Sonnet 4.6, and Sonnet 4.5 already include the global. prefix:

from anthropic import AnthropicBedrock

client = AnthropicBedrock(aws_region="us-west-2")

message = client.messages.create(
    model="global.anthropic.claude-opus-4-6-v1",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello, world"}],
)

Using regional endpoints (CRIS):

To use regional endpoints, replace the global. prefix with a regional prefix such as us.:

from anthropic import AnthropicBedrock

client = AnthropicBedrock(aws_region="us-west-2")

# Using US regional endpoint (CRIS)
message = client.messages.create(
    model="us.anthropic.claude-opus-4-6-v1",  # Regional prefix
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello, world"}],
)

Claude Mythos Preview is a research preview model available to invited customers on Amazon Bedrock. For more information, see Project Glasswing.

Additional resources

  • Bedrock pricing: aws.amazon.com/bedrock/pricing
  • AWS pricing documentation: Bedrock pricing guide
  • AWS blog post: Introducing Claude Sonnet 4.5 in Amazon Bedrock
  • Anthropic pricing details: Cloud platform pricing

Was this page helpful?

  • Install and configure the AWS CLI
  • Install an SDK for accessing Bedrock
  • Accessing Bedrock
  • Subscribe to Anthropic models
  • List available models
  • Making requests
  • Bearer token authentication
  • Activity logging
  • Feature support
  • PDF support on Bedrock
  • Context window
  • Global vs regional endpoints
  • When to use each option
  • Implementation
  • Additional resources