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 Overflow
🌐
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 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.
🌐
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.
🌐
Anthropic Courses
anthropic.skilljar.com › claude-in-amazon-bedrock
Claude with Amazon Bedrock
This technical course provides a comprehensive guide to integrating and deploying Claude AI models through Amazon Bedrock. Developers will learn to implement Claude's API, build production-ready applications, and leverage advanced features including ...
🌐
Claude Docs
platform.claude.com › docs › en › build-with-claude › claude-on-amazon-bedrock
Claude on Amazon Bedrock - Claude Docs
The 1M token context window is currently in beta. To use the extended context window, include the context-1m-2025-08-07 beta header in your Bedrock API requests. Starting with Claude Sonnet 4.5 and all future models, Amazon Bedrock offers two endpoint types:
🌐
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.
Find elsewhere
🌐
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.
🌐
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.
🌐
Claude
claude.com › partners › amazon-bedrock
Amazon Bedrock | Claude
Access Claude’s advanced language models through Amazon Bedrock for enterprise-scale deployment. Build reliable AI applications with our powerful API integration.
🌐
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
🌐
Medium
aws.plainenglish.io › configuring-claude-code-extension-with-aws-bedrock-and-how-you-can-avoid-my-mistakes-090dbed5215b
Configuring Claude Code Extension with AWS Bedrock (And How You Can Avoid My Mistakes) | by Vasko Kelkocev | AWS in Plain English
November 5, 2025 - Reference: AWS Bedrock Inference Profiles Documentation · What we’re doing: We need to get the exact Amazon Resource Name (ARN) for our inference profile. This ARN is what Claude Code will use to connect to Bedrock.
🌐
AWS
aws.amazon.com › blogs › aws › introducing-claude-sonnet-4-5-in-amazon-bedrock-anthropics-most-intelligent-model-best-for-coding-and-complex-agents
Introducing Claude Sonnet 4.5 in Amazon Bedrock: Anthropic’s most intelligent model, best for coding and complex agents | Amazon Web Services
September 29, 2025 - Sonnet 4.5 features in the Amazon Bedrock API Here are some highlights of Sonnet 4.5 in the Amazon Bedrock API: Smart Context Window Management – The new API introduces intelligent handling when AI models reach their maximum capacity. Instead of returning errors when conversations get too long, Claude Sonnet 4.5 will now generate responses up to the available limit and clearly indicate why it stopped.
🌐
Claude
docs.claude.com › en › docs › build-with-claude › claude-on-amazon-bedrock
Claude on Amazon Bedrock - Claude Docs
For full control without forced citations, use the InvokeModel API For more details on the two document processing modes and their limitations, refer to the PDF support guide. Claude Sonnet 4 and 4.5 support the 1M token context window on Amazon Bedrock.
🌐
Samuelliedtke
samuelliedtke.com › blog › accessing-anthropic-claude-via-api-individual
Using Anthropic Claude with llm via AWS Bedrock | Samuel Liedtke
export AWS_DEFAULT_REGION=us-east-1 export AWS_PROFILE=bedrock-api · Request access to the models from the AWS Bedrock console. ... # list available models aws bedrock list-foundation-models # use claude haiku (can also use alias `bh`) llm -m anthropic.claude-3-haiku-20240307-v1:0 -s \ "ten names for a pet octopus"
🌐
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.