---
title: Claude in Amazon Bedrock (bedrock-mantle)
url: https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock
description: Call Claude through the Messages API on Amazon Bedrock's bedrock-mantle endpoint, with AWS-native authentication, billing, and security boundaries.
---

This guide walks you through setting up and making API calls to Claude in Amazon Bedrock. Claude in Amazon Bedrock runs on AWS-managed infrastructure with zero operator access: Anthropic personnel have no access to the inference infrastructure. You can build sensitive applications entirely inside the AWS security boundary, with the same Messages API shape you use with the Claude API.

<Note>
  This page covers Claude in Amazon Bedrock, which serves Claude through the Messages API at `/anthropic/v1/messages` on the `bedrock-mantle` endpoint. That endpoint runs on AWS-managed infrastructure. The `InvokeModel` and `Converse` APIs, on the `bedrock-runtime` endpoint, are documented at [Claude on Amazon Bedrock (`bedrock-runtime`)](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy). For an Anthropic-operated alternative on AWS with AWS Marketplace billing, see [Claude Platform on AWS](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws).
</Note>

## Access

Amazon Bedrock sets access criteria for each Claude model individually. Claude Fable 5.1, Claude Fable 5, Claude Opus 4.8, Claude Sonnet 5, Claude Opus 4.7, and Claude Haiku 4.5 are open to all Amazon Bedrock customers. For any other model’s criteria, check [Amazon Bedrock model access](https://console.aws.amazon.com/bedrock/home#/modelaccess) in the AWS console. For region availability, see [Regions](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions).

## Prerequisites

Before you start, ensure you have:

* An AWS account with [Amazon Bedrock model access](https://console.aws.amazon.com/bedrock/home#/modelaccess) enabled for the Claude models you intend to use
* The [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) installed and configured (optional, for credential management)

## Authentication

Claude in Amazon Bedrock supports three authentication paths. Choose the one that best fits your security requirements.

### Bedrock service role (recommended)

Use a Bedrock service role with AWS-managed keys for the most secure, long-lived access:

<Steps>
  <Step title="Admin: provision the service role">
    An AWS administrator provisions a Bedrock service role and grants developers `iam:PassRole` permission on the service role ARN.
  </Step>

  <Step title="Developer: pass the role">
    When you call the API, Bedrock assumes the service role on your behalf. See the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html) for how to associate the role with your requests.
  </Step>
</Steps>

### IAM assumed roles

For identity-federated access with a 12-hour maximum session:

<Steps>
  <Step title="Admin: configure the IAM role">
    Create an IAM role scoped to your Claude models. The trust policy names your identity provider (SAML, OIDC, or AWS Identity Center). The permissions policy grants `bedrock-mantle:CreateInference` only on the allowed model ARNs.
  </Step>

  <Step title="Developer: authenticate and assume">
    Authenticate through your corporate identity provider, then assume the IAM role. AWS STS issues temporary credentials that the SDK or CLI uses to sign requests.
  </Step>
</Steps>

### Bearer tokens

A bearer token lets you call the endpoint without signing requests with AWS credentials. AWS calls this token an Amazon Bedrock API key. AWS recommends signing with temporary AWS credentials whenever possible, so bearer tokens are the least preferred of the three authentication paths. Use a bearer token when your software can’t sign requests.

Bearer tokens come in two types:

| Aspect | Short-term | Long-term |
| ----- | ----- | ----- |
| **Lifetime** | Up to 12 hours, or until the AWS session that generated it ends, whichever comes first | Until its expiration date. If it has none, it never expires. |
| **Permissions** | Those of the IAM identity that generated it | Those of the IAM user that it belongs to |
| **Notes** | Works only in the AWS region where you generate it | Recommended by AWS only for exploration |

For either type, the IAM identity whose permissions the token carries needs the `bedrock-mantle:CallWithBearerToken` and `bedrock-mantle:CreateInference` permissions.

To use a bearer token:

<Steps>
  <Step title="Generate the token">
    Generate either type in the Amazon Bedrock console. You can also generate a short-term token with one of AWS’s token generator libraries. For instructions, see [API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html) in the Amazon Bedrock User Guide.
  </Step>

  <Step title="Send the token">
    How you send the token depends on how you call the endpoint:

    * **With the SDK:** Set the `AWS_BEARER_TOKEN_BEDROCK` environment variable. For how the client finds credentials, see [Making your first request](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
    * **With direct HTTP requests:** Instead of signing each request, pass the token in the `x-api-key` header or as `Authorization: Bearer <token>`. Leave out the request-signing parts, such as the `x-amz-security-token` header and cURL’s `--aws-sigv4` and `-u` options.
  </Step>
</Steps>

#### Block long-term bearer tokens

An administrator can stop IAM users from calling Amazon Bedrock with long-term tokens. A token works on both Amazon Bedrock endpoints, and each endpoint has its own IAM action and condition key:

| Endpoint | Action to deny | Condition key |
| ----- | ----- | ----- |
| `bedrock-mantle` | `bedrock-mantle:CallWithBearerToken` | `bedrock-mantle:bearerTokenType` |
| `bedrock-runtime` | `bedrock:CallWithBearerToken` | `bedrock:bearerTokenType` |

Write a policy with one Deny statement for each endpoint. In each statement, set `Resource` to `*`, and use `StringEquals` to require that the condition key equals `LONG_TERM`.

Where you attach the policy determines which tokens it blocks:

* **One IAM user:** It blocks that user’s tokens. The Amazon Bedrock console creates a new IAM user for each long-term token, so this misses tokens generated there later.
* **A member account in AWS Organizations:** As a service control policy (SCP), it blocks the tokens of every IAM user in the account, including new users.

The policy blocks using long-term tokens, not generating them. For a sample of this policy and for policies that control generation, see [Control permissions for generating and using Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-permissions.html) in the Amazon Bedrock User Guide.

## Install an SDK

The [client SDK](https://code.saschaberens.de/_h/platform.claude.com/docs/en/cli-sdks-libraries/overview) supports Claude in Amazon Bedrock through a Bedrock-specific package or module.

<Tabs>
  <Tab title="Python">
    ```bash
    pip install -U "anthropic[bedrock]"
    ```
  </Tab>

  <Tab title="TypeScript">
    ```bash
    npm install @anthropic-ai/bedrock-sdk
    ```
  </Tab>

  <Tab title="C#">
    ```bash
    dotnet add package Anthropic.Bedrock
    ```
  </Tab>

  <Tab title="Go">
    ```bash
    go get github.com/anthropics/anthropic-sdk-go/v2/bedrock
    ```
  </Tab>

  <Tab title="Java">
    <Tabs>
      <Tab title="Gradle">
        ```kotlin
        implementation("com.anthropic:anthropic-java:3.13.0")
        implementation("com.anthropic:anthropic-java-bedrock:3.13.0")
        ```
      </Tab>

      <Tab title="Maven">
        ```xml
        <dependency>
            <groupId>com.anthropic</groupId>
            <artifactId>anthropic-java</artifactId>
            <version>3.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.anthropic</groupId>
            <artifactId>anthropic-java-bedrock</artifactId>
            <version>3.13.0</version>
        </dependency>
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="PHP">
    ```bash
    composer require anthropic-ai/sdk aws/aws-sdk-php
    ```
  </Tab>

  <Tab title="Ruby">
    ```bash
    bundle add anthropic
    bundle add aws-sdk-core
    ```
  </Tab>
</Tabs>

## Making your first request

The endpoint follows the pattern `https://bedrock-mantle.{region}.api.aws/anthropic/v1/messages`. It uses standard SSE streaming and the same request body shape as the Claude API.

Pass the region when you create the client, or set the `AWS_REGION` environment variable. If you do neither, the Python, TypeScript, C#, Go, PHP, and Ruby SDKs try `AWS_DEFAULT_REGION`. The Java SDK reads the environment only when you call `BedrockMantleBackend.fromEnv()`, which uses the [default AWS Region provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/region-selection.html). That chain also checks your AWS config file and EC2 instance metadata.

For credentials, the client uses what you pass when you create it. Otherwise, the `AWS_BEARER_TOKEN_BEDROCK` environment variable takes priority over the client’s AWS credential chain, which includes the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` environment variables.

<Tabs>
  <Tab title="cURL">
    ```bash
    curl https://bedrock-mantle.us-east-1.api.aws/anthropic/v1/messages \
      --aws-sigv4 "aws:amz:us-east-1:bedrock-mantle" \
      -u "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
      -H "x-amz-security-token: $AWS_SESSION_TOKEN" \
      -H "content-type: application/json" \
      -H "anthropic-version: 2026-10-21" \
      -d '{
        "model": "anthropic.claude-opus-5-5",
        "max_tokens": 1024,
        "messages": [
          {"role": "user", "content": "Hello, Claude"}
        ]
      }'
    ```
  </Tab>

  <Tab title="CLI">
    The `ant` CLI does not support Amazon Bedrock. Use either cURL or an SDK.
  </Tab>

  <Tab title="Python">
    ```python
    from anthropic import AnthropicBedrockMantle

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

    message = client.messages.create(
        model="anthropic.claude-opus-5-5",
        max_tokens=1024,
        messages=[{"role": "user", "content": "Hello, Claude"}],
    )

    print(next(block.text for block in message.content if block.type == "text"))
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript
    import { AnthropicBedrockMantle } from "@anthropic-ai/bedrock-sdk";

    const client = new AnthropicBedrockMantle({
      awsRegion: "us-east-1"
    });

    const message = await client.messages.create({
      model: "anthropic.claude-opus-5-5",
      max_tokens: 1024,
      messages: [{ role: "user", content: "Hello, Claude" }]
    });

    const textBlock = message.content.find((block) => block.type === "text");
    if (textBlock) {
      console.log(textBlock.text);
    }
    ```
  </Tab>

  <Tab title="C#">
    ```csharp
    using Anthropic.Bedrock;
    using Anthropic.Models.Messages;

    var client = new AnthropicBedrockMantleClient(new() { AwsRegion = "us-east-1" });

    var message = await client.Messages.Create(new()
    {
        Model = "anthropic.claude-opus-5-5",
        MaxTokens = 1024,
        Messages = [new UserMessageParam { Content = "Hello, Claude" }],
    });

    foreach (var item in message.Content)
    {
        if (item.Value is TextBlock block)
        {
            Console.WriteLine(block.Text);
            break;
        }
    }
    ```
  </Tab>

  <Tab title="Go">
    ```go
    import (
    	"context"
    	"fmt"

    	"github.com/anthropics/anthropic-sdk-go/v2"
    	"github.com/anthropics/anthropic-sdk-go/v2/bedrock"
    )

    func main() {
    	client, err := bedrock.NewMantleClient(
    		context.Background(),
    		bedrock.MantleClientConfig{AWSRegion: "us-east-1"},
    	)
    	if err != nil {
    		panic(err)
    	}

    	message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
    		Model:     "anthropic.claude-opus-5-5",
    		MaxTokens: 1024,
    		Messages: []anthropic.MessageParam{
    			anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude")),
    		},
    	})
    	if err != nil {
    		panic(err)
    	}

    	for _, block := range message.Content {
    		if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok {
    			fmt.Println(textBlock.Text)
    			break
    		}
    	}
    }
    ```
  </Tab>

  <Tab title="Java">
    ```java
    import com.anthropic.bedrock.backends.BedrockMantleBackend;
    import com.anthropic.client.AnthropicClient;
    import com.anthropic.client.okhttp.AnthropicOkHttpClient;
    import com.anthropic.models.messages.ContentBlock;
    import com.anthropic.models.messages.Message;
    import com.anthropic.models.messages.MessageCreateParams;

    void main() {
        AnthropicClient client = AnthropicOkHttpClient.builder()
            .backend(BedrockMantleBackend.fromEnv())
            .build();

        Message message = client.messages().create(
            MessageCreateParams.builder()
                .model("anthropic.claude-opus-5-5")
                .maxTokens(1024)
                .addUserMessage("Hello, Claude")
                .build()
        );

        message.content().stream()
            .filter(ContentBlock::isText)
            .findFirst()
            .ifPresent(block -> IO.println(block.asText().text()));
    }
    ```
  </Tab>

  <Tab title="PHP">
    ```php
    use Anthropic\Bedrock\MantleClient;

    $client = new MantleClient(awsRegion: 'us-east-1');

    $message = $client->messages->create(
        model: 'anthropic.claude-opus-5-5',
        maxTokens: 1024,
        messages: [
            ['role' => 'user', 'content' => 'Hello, Claude'],
        ],
    );

    echo array_find($message->content, fn ($block) => $block->type === 'text')->text;
    ```
  </Tab>

  <Tab title="Ruby">
    ```ruby
    require "anthropic"

    client = Anthropic::BedrockMantleClient.new(aws_region: "us-east-1")

    message = client.messages.create(
      model: "anthropic.claude-opus-5-5",
      max_tokens: 1024,
      messages: [{role: "user", content: "Hello, Claude"}]
    )

    text_block = message.content.grep(Anthropic::Models::TextBlock).first
    puts text_block.text if text_block
    ```
  </Tab>
</Tabs>

<Tip>
  You can also create the standard client with `Anthropic` (go: `anthropic.NewClient()`; java: `AnthropicOkHttpClient.builder()`; csharp: `AnthropicClient`; php: `Anthropic\Client`; ruby: `Anthropic::Client`): set `base_url` (typescript: `baseURL`; go: `option.WithBaseURL()`; java: `.baseUrl()`; csharp: `BaseUrl`; php: `baseUrl`) to `https://bedrock-mantle.{region}.api.aws/anthropic` and pass your bearer token as `api_key` (typescript, php: `apiKey`; go: `option.WithAPIKey()`; java: `.apiKey()`; csharp: `ApiKey`). This path supports bearer-token authentication only. SigV4 signing requires `AnthropicBedrockMantle` (csharp: `AnthropicBedrockMantleClient`; go: `bedrock.NewMantleClient()`; java: `BedrockMantleBackend`; php: `MantleClient`; ruby: `Anthropic::BedrockMantleClient`).
</Tip>

## Supported models

Model IDs in Claude in Amazon Bedrock carry an `anthropic.` provider prefix. For model capabilities and behaviors, see [Models overview](https://code.saschaberens.de/_h/platform.claude.com/docs/en/models/overview). Claude Fable 5.2 and Claude Mythos 5.2 aren’t available in Claude in Amazon Bedrock. Amazon Bedrock serves them on the `bedrock-runtime` endpoint only. For their model IDs, see [API model IDs](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#api-model-ids). To see which endpoint serves each model, see [Endpoint availability by models](https://docs.aws.amazon.com/bedrock/latest/userguide/models-endpoint-availability.html) in the AWS documentation.

| Model | Model ID | Access |
| :---- | :---- | :---- |
| Claude Fable 5.1 | `anthropic.claude-fable-5-1` | Open |
| Claude Mythos 5.1 ([limited availability](https://code.saschaberens.de/_h/support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5-1` | Active (verification required) |
| Claude Fable 5 | `anthropic.claude-fable-5` | Open |
| Claude Mythos 5 ([limited availability](https://code.saschaberens.de/_h/support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5` | Active (verification required) |
| Claude Opus 5.5 | `anthropic.claude-opus-5-5` | [See Access](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
| Claude Opus 5 | `anthropic.claude-opus-5` | [See Access](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
| Claude Opus 4.8 | `anthropic.claude-opus-4-8` | Open |
| Claude Opus 4.7 | `anthropic.claude-opus-4-7` | Open |
| Claude Sonnet 5.5 | `anthropic.claude-sonnet-5-5` | [See Access](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
| Claude Sonnet 5 | `anthropic.claude-sonnet-5` | Open |
| Claude Haiku 5.5 | `anthropic.claude-haiku-5-5` | [See Access](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#access) |
| Claude Haiku 4.5 | `anthropic.claude-haiku-4-5` | Open |

Use the latest version of Claude Code with Claude in Amazon Bedrock; run `claude update` to upgrade.

Let Claude Code migrate your code to a newer model

```text
/claude-api migrate this project to the latest Claude Opus model
```

## Feature support

For the full feature list with Amazon Bedrock availability, see [Features overview](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/overview).

### Supported feature highlights

* [Messages API](https://code.saschaberens.de/_h/platform.claude.com/docs/en/api/messages/create) (`/anthropic/v1/messages`)
* [Prompt caching](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/prompt-caching)
* [Thinking](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/thinking)
* [Tool use](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), [Browser use tool](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), [Computer use tool](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](https://code.saschaberens.de/_h/platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool)
* [Citations](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/citations)
* [Structured outputs](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/structured-outputs)

### Features not supported

* Input sources (URL sources for images and documents, Files API)
* Server-side tools (code execution, web search, web fetch, advisor)
* Agent infrastructure (Agent Skills, MCP connector, programmatic tool calling)
* API endpoints (Message Batches, Models, Admin, Compliance, Usage and Cost)
* Claude Managed Agents
* Server-side fallback (the [`fallbacks` parameter](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback); use the [client-side fallback pattern](https://code.saschaberens.de/_h/platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead)

## Regions

Claude in Amazon Bedrock is available in the following AWS regions. Amazon Bedrock offers two endpoint types:

* **Global:** dynamic routing across all available regions for maximum availability. No pricing premium.
* **Regional:** the endpoint resolves to the single AWS region you specify, for data-residency requirements. Regional endpoints carry a 10 percent pricing premium over global endpoints. To route across multiple regions within a geography, use an [inference profile](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) (US, EU, JP, or AU). Regions marked **In-region only** in the table support direct single-region routing without an inference profile.

The global endpoint is available for Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, and Claude Haiku 4.5.

| AWS region | Location | Endpoint types |
| ----- | ----- | ----- |
| `af-south-1` | Africa (Cape Town) | Global |
| `ap-northeast-1` | Asia Pacific (Tokyo) | Global, JP, In-region only |
| `ap-northeast-2` | Asia Pacific (Seoul) | Global |
| `ap-northeast-3` | Asia Pacific (Osaka) | Global, JP |
| `ap-south-1` | Asia Pacific (Mumbai) | Global |
| `ap-south-2` | Asia Pacific (Hyderabad) | Global |
| `ap-southeast-1` | Asia Pacific (Singapore) | Global |
| `ap-southeast-2` | Asia Pacific (Sydney) | Global, AU |
| `ap-southeast-3` | Asia Pacific (Jakarta) | Global |
| `ap-southeast-4` | Asia Pacific (Melbourne) | Global, AU, In-region only |
| `ca-central-1` | Canada (Central) | Global, US |
| `ca-west-1` | Canada West (Calgary) | Global |
| `eu-central-1` | Europe (Frankfurt) | Global, EU |
| `eu-central-2` | Europe (Zurich) | Global, EU |
| `eu-north-1` | Europe (Stockholm) | Global, EU, In-region only |
| `eu-south-1` | Europe (Milan) | Global, EU |
| `eu-south-2` | Europe (Spain) | Global, EU |
| `eu-west-1` | Europe (Ireland) | Global, EU, In-region only |
| `eu-west-2` | Europe (London) | Global, EU |
| `eu-west-3` | Europe (Paris) | Global, EU |
| `il-central-1` | Israel (Tel Aviv) | Global |
| `me-central-1` | Middle East (UAE) | Global |
| `sa-east-1` | South America (São Paulo) | Global |
| `us-east-1` | US East (N. Virginia) | Global, US, In-region only |
| `us-east-2` | US East (Ohio) | Global, US, In-region only |
| `us-west-1` | US West (N. California) | Global, US |
| `us-west-2` | US West (Oregon) | Global, US, In-region only |

## Quotas

Default quota is 2 million input tokens per minute (TPM). You can request up to 5 million input TPM and 500,000 output TPM without additional Anthropic approval. AWS enforces requests-per-minute (RPM) limits on the Bedrock side; contact AWS Support for RPM adjustments.

## Data retention

Amazon Bedrock governs data handling for Claude in Amazon Bedrock. For details, see [Data protection in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/data-protection.html).

## Monitoring and logging

Claude in Amazon Bedrock emits logs to both CloudWatch and CloudTrail. Anthropic recommends retaining activity logs on at least a 30-day rolling basis to understand usage patterns and investigate potential issues.

## Support

For support, contact AWS Support or your AWS account team. Include your AWS account ID and the `request-id` from any failed API responses.
