There are some environment variables you can set to use Bedrock for your session to force Claude Code to use Bedrock.
export CLAUDE_CODE_USE_BEDROCK=1
export ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0'
You can also use claude config to set Bedrock as the default provider.
claude config set --global env '{"CLAUDE_CODE_USE_BEDROCK": "true", "ANTHROPIC_MODEL": "us.anthropic.claude-3-7-sonnet-20250219-v1:0"}
Answer from wonton on Stack OverflowAWS
docs.aws.amazon.com › amazon bedrock › user guide › amazon bedrock foundation model information › inference request parameters and response fields for foundation models › anthropic claude models › anthropic claude messages api
Anthropic Claude Messages API - Amazon Bedrock
This topic shows how to use the Anthropic Claude messages API with the base inference operations (InvokeModel or InvokeModelWithResponseStream). However, we recommend that you use the Converse API to implement messages in your application. The Converse API provides a unified set of parameters that work across all models that support messages.
AWS
docs.aws.amazon.com › amazon bedrock › user guide › amazon bedrock foundation model information › inference request parameters and response fields for foundation models › anthropic claude models
Anthropic Claude models - Amazon Bedrock
You can use Amazon Bedrock to send Anthropic Claude Text Completions API or Anthropic Claude Messages API inference requests.
Videos
27:16
Building AI agents with Claude in Amazon Bedrock | Code w/ Claude ...
08:12
How-To Use Claude 3.7 Sonnet in Amazon Bedrock - YouTube
09:10
How to Use Claude 3 with Amazon Bedrock - YouTube
10:32
How to Use Claude 3 Haiku Locally Using Amazon Bedrock in Boto3 ...
05:18
Claude API on AWS Bedrock - YouTube
27:42
Mastering Amazon Bedrock with Claude 3: Developer's Guide with ...
Claude
code.claude.com › docs › en › amazon-bedrock
Claude Code on Amazon Bedrock - Claude Code Docs
Specify the model as an inference profile ID Claude Code uses the Bedrock Invoke API and does not support the Converse API.
GitHub
github.com › aws-samples › function-calling-using-amazon-bedrock-anthropic-claude-3
GitHub - aws-samples/function-calling-using-amazon-bedrock-anthropic-claude-3: Function calling using Amazon Bedrock with Anthropic Claude 3 foundation model
Amazon Bedrock is a fully managed service that offers a choice of high-performing foundation models from leading AI companies and a set of capabilities to build generative AI applications. This sample repo provide an example for using function calling using the Converse API with Anthropic Claude 3 Sonnet, using multiple tools.
Starred by 37 users
Forked by 9 users
Languages Python
AWS
docs.aws.amazon.com › amazon bedrock › user guide › code examples for amazon bedrock using aws sdks › code examples for amazon bedrock runtime using aws sdks › anthropic claude for amazon bedrock runtime › invoke anthropic claude on amazon bedrock using the invoke model api
Invoke Anthropic Claude on Amazon Bedrock using the Invoke Model API - Amazon Bedrock
# Use the native inference API to send a text message to Anthropic Claude. import boto3 import json from botocore.exceptions import ClientError # Create a Bedrock Runtime client in the AWS Region of your choice. client = boto3.client("bedrock-runtime", region_name="us-east-1") # Set the model ID, e.g., Claude 3 Haiku.
Medium
medium.com › @hannah.hj.do › how-to-access-claude-2-1-via-aws-bedrock-3e322cfe107e
How to access Claude-2.1 via AWS Bedrock | by Hannah Do | Medium
March 16, 2024 - AWS Bedrock service wasn’t yet opened in Seoul region so I switched Tokyo region (ap-northeast-1) and submitted API request. The request was approved in only few minutes! ... Excited to test out the results, I created a new client for Claude with basic information, added boto3 to my virtual environment (poetry), updated aws cli, and stored aws account information (aws configure) on my server.
Reddit
reddit.com › r/aws › claude code with aws bedrock api key
r/aws on Reddit: Claude code with AWS Bedrock API key
March 20, 2025 -
Has anyone able to figure out how to set this up? Tried the bellow steps with no luck... On start it still directs to anthropic console for apikey
https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide?lang=en
DEV Community
dev.to › yitaek › setting-up-aws-bedrock-with-claude-5f67
Setting up AWS Bedrock with Claude - DEV Community
2 days ago - Since Claude Code uses the default AWS SDK credentials, we can leverage existing methods to authenticate with AWS (as long as we have IAM permissions to access Bedrock). ... export AWS_ACCESS_KEY_ID=your-access-key-id export AWS_SECRET_ACCESS_KEY=your-secret-access-key export AWS_SESSION_TOKEN=your-session-token ... The other option is to leverage Bedrock API keys to authenticate directly with Bedrock.
AWS
docs.aws.amazon.com › amazon bedrock › user guide › code examples for amazon bedrock using aws sdks › code examples for amazon bedrock runtime using aws sdks › anthropic claude for amazon bedrock runtime › invoke anthropic claude models on amazon bedrock using the invoke model api with a response stream
Invoke Anthropic Claude models on Amazon Bedrock using the Invoke Model API with a response stream - Amazon Bedrock
# Use the native inference API to send a text message to Anthropic Claude # and print the response stream. import boto3 import json # Create a Bedrock Runtime client in the AWS Region of your choice. client = boto3.client("bedrock-runtime", region_name="us-east-1") # Set the model ID, e.g., Claude 3 Haiku.
AWS re:Post
repost.aws › questions › QUSd3wAByQTtyzUPzgqss3TQ › web-search-for-anthropic-models-in-bedrock
Web Search for Anthropic Models in Bedrock | AWS re:Post
May 7, 2025 - As of the latest available information, Amazon Bedrock does not directly support the web_search tool for Anthropic models through the Converse API in the way you've described. However, Amazon Bedrock does offer a way to integrate web search capabilities with Anthropic models, including Claude 3.7 Sonnet, through Amazon Bedrock Agents.
AWS
docs.aws.amazon.com › amazon bedrock › user guide › code examples for amazon bedrock using aws sdks › code examples for amazon bedrock runtime using aws sdks › anthropic claude for amazon bedrock runtime › invoke anthropic claude on amazon bedrock using bedrock's converse api
Invoke Anthropic Claude on Amazon Bedrock using Bedrock's Converse API - Amazon Bedrock
For API details, see Converse in AWS SDK for .NET API Reference. ... There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository ... Send a text message to Anthropic Claude, using Bedrock's Converse API.