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.
🌐
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
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
🌐
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
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
🌐
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 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:
🌐
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.
🌐
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.
🌐
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.
🌐
LiteLLM
docs.litellm.ai › supported models & providers › aws bedrock
AWS Bedrock | liteLLM
model_list: - model_name: bedrock-claude-3-sonnet litellm_params: model: bedrock/anthropic.claude-3-sonnet-20240229-v1:0 api_key: os.environ/AWS_BEARER_TOKEN_BEDROCK
🌐
Reddit
reddit.com › r/claudeai › claude anthropic api vs claude bedrock api
r/ClaudeAI on Reddit: Claude Anthropic API vs Claude bedrock API
January 3, 2025 -

Hi all,

I'm currently running into rate limit challenges with multiple Claude Pro subscriptions (using Claude 3.5 Sonnet primarily for coding tasks). I'm considering switching to an API-based solution and would appreciate insights on choosing between Anthropic's direct API and Claude models hosted on Amazon Bedrock.

Key questions I'm trying to understand:

  1. Rate Limits & Capacity

    • How do the rate limits and token quotas compare between Anthropic's direct API and Claude on Amazon Bedrock (specifically for Claude 3.5 Sonnet)?

    • I've heard Anthropic's direct API has stricter limits than their subscription service - is this accurate?

  2. Performance Metrics

    • What are the differences in latency and token generation speed between the two platforms?

    • Are there any notable performance advantages to either option?

  3. Tier Upgrades & Limits

    • What's involved in getting approved for higher usage tiers on each platform?

    • How do their respective approval processes compare?

  4. Cost Structure

    • While pricing isn't a major factor for my personal use case, I'd like to understand the cost differences

    • Are there any hidden costs or considerations I should be aware of?

Any insights on these points would be valuable, even if you can only speak to some aspects of the comparison. Thank you for your help!