claude-on-amazon-bedrock-legacy changedbuild-with-claude/claude-on-amazon-bedrock-legacy
Nearest release: v2.1.318, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+30added
Lines−16removed
From line
10
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits41to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010
1111<Warning>
1212 The latest version of the SDK sends API version `2026-10-21` by default, including through Amazon Bedrock. The ARN-versioned models in the model table on this page don’t support `2026-10-21` on Bedrock, and requests to them that send it can return a 400 error. If you call them through the SDK, keep the SDK on the version you use today, and pin that version where you install it so a later install doesn’t upgrade it. The Boto3 example sets `anthropic_version` in its request body and isn’t affected.
13
14 To install an SDK for these models, use the commands in [Install an SDK for accessing Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#install-an-sdk-for-accessing-bedrock), which install the last major version before API version `2026-10-21`.
1315</Warning>
1416
1517Calling 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](https://platform.claude.com/docs/en/cli-sdks-libraries/overview).
from line 35
3335<Tabs>
3436 <Tab title="Python">
3537 ```bash
36 pip install -U "anthropic[bedrock]"
38 pip install -U "anthropic[bedrock]<2"
3739 ```
3840 </Tab>
3941
4042 <Tab title="TypeScript">
4143 ```bash
42 npm install @anthropic-ai/bedrock-sdk
44 npm install @anthropic-ai/bedrock-sdk@0
4345 ```
46
47 The example in [List available models](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#list-available-models) also needs AWS’s Bedrock client. Install it with `npm install @aws-sdk/client-bedrock`.
4448 </Tab>
4549
4650 <Tab title="C#">
4751 ```bash
48 dotnet add package Anthropic.Bedrock
52 dotnet add package Anthropic.Bedrock --version 0.14.1
4953 ```
54
55 If your project also references the `Anthropic` package, keep it below version 13.
56
57 The example in [List available models](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#list-available-models) also needs AWS’s Bedrock client. Install it with `dotnet add package AWSSDK.Bedrock`.
5058 </Tab>
5159
5260 <Tab title="Go">
from line 61
5361 ```bash
5462 go get github.com/anthropics/anthropic-sdk-go/bedrock
5563 ```
64
65 The example in [List available models](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#list-available-models) also needs AWS’s Bedrock client. Install it with `go get github.com/aws/aws-sdk-go-v2/service/bedrock`.
5666 </Tab>
5767
5868 <Tab title="Java">
5969 <CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby">
6070 ```groovy Gradle
61 implementation("com.anthropic:anthropic-java:3.4.0")
62 implementation("com.anthropic:anthropic-java-bedrock:3.4.0")
71 implementation("com.anthropic:anthropic-java:2.+")
72 implementation("com.anthropic:anthropic-java-bedrock:2.+")
6373 ```
6474
6575 ```xml Maven
from line 76
6676 <dependency>
6777 <groupId>com.anthropic</groupId>
6878 <artifactId>anthropic-java</artifactId>
69 <version>3.4.0</version>
79 <version>[2.0.0,3.0.0)</version>
7080 </dependency>
7181 <dependency>
7282 <groupId>com.anthropic</groupId>
7383 <artifactId>anthropic-java-bedrock</artifactId>
74 <version>3.4.0</version>
84 <version>[2.0.0,3.0.0)</version>
7585 </dependency>
7686 ```
7787
from line 113
103113 }
104114 ```
105115 </CodeGroup>
116
117 The example in [List available models](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#list-available-models) also needs AWS’s Bedrock client. Add `software.amazon.awssdk:bedrock` to your build.
106118 </Tab>
107119
108120 <Tab title="PHP">
109121 ```bash
110 composer require anthropic-ai/sdk aws/aws-sdk-php
122 composer require "anthropic-ai/sdk:<1.0" aws/aws-sdk-php
111123 ```
112124 </Tab>
113125
from line 126
114126 <Tab title="Ruby">
115127 ```bash
116128 # Gemfile
117 gem "anthropic"
129 gem "anthropic", "~> 1.0"
118130 gem "aws-sdk-bedrockruntime"
119131 ```
132
133 The example in [List available models](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#list-available-models) also needs AWS’s Bedrock client. Add `gem "aws-sdk-bedrock"` to your `Gemfile`.
120134 </Tab>
121135
122136 <Tab title="Boto3 (Python)">
from line 664
650664 import com.anthropic.client.AnthropicClient;
651665 import com.anthropic.client.okhttp.AnthropicOkHttpClient;
652666 import com.anthropic.models.messages.MessageCreateParams;
667 import software.amazon.awssdk.regions.Region;
653668
654669 // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv()
655670 AnthropicClient client = AnthropicOkHttpClient.builder()
from line 675
660675 client = AnthropicOkHttpClient.builder()
661676 .backend(BedrockBackend.builder()
662677 .apiKey("your-bearer-token")
678 .region(Region.US_WEST_2)
663679 .build())
664680 .build();
665681
from line 1031
10151031 using Anthropic.Bedrock;
10161032 using Anthropic.Models.Messages;
10171033
1034 // Default credentials resolve region from AWS_REGION env var
10181035 AnthropicBedrockClient client = new(
1019 new AnthropicBedrockPrivateKeyCredentials { Region = "us-west-2" }
1036 await AnthropicBedrockCredentialsHelper.FromEnv()
1037 ?? throw new InvalidOperationException("AWS credentials not configured.")
10201038 );
10211039
10221040 // Using US regional endpoint (CRIS)
from line 1130
11121130 ```
11131131 </Tab>
11141132</Tabs>
1115
1116<Note>
1117 **Claude Mythos Preview** is a research preview model available to invited customers on Amazon Bedrock. For more information, see [Project Glasswing](https://anthropic.com/glasswing).
1118</Note>
11191133
11201134## Additional resources
11211135
No line in this hunk matches that.