claude-on-amazon-bedrock-legacy changedbuild-with-claude/claude-on-amazon-bedrock-legacy
Nearest release: v2.1.334, published 5 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+49added
Lines−24removed
From line
326
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits49to this page, all time
The whole hunk
from line 326, old and new numbered
/
from line 326
326326
327327<Tabs>
328328 <Tab title="cURL">
329 <Note>
330 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
331 </Note>
329 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK and the `ant` CLI handle for you. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
332330 </Tab>
333331
334332 <Tab title="CLI">
335 <Note>
336 The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead.
337 </Note>
333 The [latest version of `ant`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation) sends this request to `bedrock-runtime` when you set `ANTHROPIC_BEDROCK_REGION` or pass `--bedrock-region`. It signs the request with credentials from the default AWS credential chain, unless `AWS_BEARER_TOKEN_BEDROCK` is set.
334
335 These settings take precedence over the region and can send the request elsewhere, so leave them unset:
336
337 * `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN`
338 * An `ant` profile set with `--profile` or `ANTHROPIC_PROFILE`
339 * [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) variables
340 * Settings for other cloud platforms
341
342 To check, run `ant auth status` with the same region setting, and confirm that the `Bedrock` row is marked `(active)`.
343
344 ```bash
345 ANTHROPIC_BEDROCK_REGION=us-west-2 ant messages create \
346 --model global.anthropic.claude-opus-5-5 \
347 --max-tokens 1024 \
348 --message '{role: user, content: "Hello, world"}'
349 ```
350
351 The CLI sends [API version `2026-10-21`](https://platform.claude.com/docs/en/api/versioning), which the models numbered 4.6 or lower in the [model table](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#api-model-ids) don’t support on Amazon Bedrock. To call them, use the SDK version 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).
338352 </Tab>
339353
340354 <Tab title="Python">
from line 572
558572
559573<Tabs>
560574 <Tab title="cURL">
561 <Note>
562 This section shows how to configure a bearer token in an SDK client, which also reads the token from the `AWS_BEARER_TOKEN_BEDROCK` environment variable. To make direct HTTP requests with a bearer token, see the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/).
563 </Note>
575 This section shows how to configure a bearer token in an SDK client, which also reads the token from the `AWS_BEARER_TOKEN_BEDROCK` environment variable. To make direct HTTP requests with a bearer token, see the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/).
564576 </Tab>
565577
566578 <Tab title="CLI">
567 <Note>
568 The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead.
569 </Note>
579 The `ant` CLI reads the token from the `AWS_BEARER_TOKEN_BEDROCK` environment variable. For the settings to leave unset and the models that need the SDK instead, see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#making-requests).
580
581 ```bash
582 AWS_BEARER_TOKEN_BEDROCK="your-bearer-token" \
583 ANTHROPIC_BEDROCK_REGION=us-west-2 \
584 ant messages create \
585 --model us.anthropic.claude-opus-5-5 \
586 --max-tokens 1024 \
587 --message '{role: user, content: "Hello!"}'
588 ```
570589 </Tab>
571590
572591 <Tab title="Python">
from line 856
837856
838857<Tabs>
839858 <Tab title="cURL">
840 <Note>
841 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
842 </Note>
859 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK and the `ant` CLI handle for you. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
843860 </Tab>
844861
845862 <Tab title="CLI">
846 <Note>
847 The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead.
848 </Note>
863 For the settings to leave unset and the models that need the SDK instead, see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#making-requests).
864
865 ```bash
866 ANTHROPIC_BEDROCK_REGION=us-west-2 ant messages create \
867 --model global.anthropic.claude-opus-5-5 \
868 --max-tokens 1024 \
869 --message '{role: user, content: "Hello, world"}'
870 ```
849871 </Tab>
850872
851873 <Tab title="Python">
from line 1010
9881010
9891011<Tabs>
9901012 <Tab title="cURL">
991 <Note>
992 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK examples in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
993 </Note>
1013 Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDK and the `ant` CLI handle for you. For a Bedrock endpoint you can call with a self-contained cURL command, see [Making your first request with Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request).
9941014 </Tab>
9951015
9961016 <Tab title="CLI">
997 <Note>
998 The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead.
999 </Note>
1017 For the settings to leave unset and the models that need the SDK instead, see [Making requests](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#making-requests).
1018
1019 ```bash
1020 ANTHROPIC_BEDROCK_REGION=us-west-2 ant messages create \
1021 --model us.anthropic.claude-opus-5-5 \
1022 --max-tokens 1024 \
1023 --message '{role: user, content: "Hello, world"}'
1024 ```
10001025 </Tab>
10011026
10021027 <Tab title="Python">
No line in this hunk matches that.