# Table of Contents - [Claude Code overview - Anthropic](#claude-code-overview-anthropic) - [Claude Code on Amazon Bedrock - Anthropic](#claude-code-on-amazon-bedrock-anthropic) --- # Claude Code overview - Anthropic [Anthropic home page![light logo](https://mintcdn.com/anthropic/PF_69UDRSEsLpN9D/logo/light.svg?maxW=143&auto=format&n=PF_69UDRSEsLpN9D&q=85&s=ce64069b841133111e8607800b983754)![dark logo](https://mintcdn.com/anthropic/PF_69UDRSEsLpN9D/logo/dark.svg?maxW=143&auto=format&n=PF_69UDRSEsLpN9D&q=85&s=989a7daec9c66857ab4f6127a3cdec09)](https://docs.anthropic.com/) English Search... Ctrl K Search... Navigation Getting started Claude Code overview [Welcome](https://docs.anthropic.com/en/home) [Developer Platform](https://docs.anthropic.com/en/docs/intro) [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) [Model Context Protocol (MCP)](https://docs.anthropic.com/en/docs/mcp) [API Reference](https://docs.anthropic.com/en/api/messages) [Resources](https://docs.anthropic.com/en/resources/overview) [Release Notes](https://docs.anthropic.com/en/release-notes/overview) [​](https://docs.anthropic.com/en/docs/claude-code/overview#get-started-in-30-seconds) Get started in 30 seconds ------------------------------------------------------------------------------------------------------------------- Prerequisites: * [Node.js 18 or newer](https://nodejs.org/en/download/) * A [Claude.ai](https://claude.ai/) (recommended) or [Anthropic Console](https://console.anthropic.com/) account # Install Claude Code npm install -g @anthropic-ai/claude-code # Navigate to your project cd your-awesome-project # Start coding with Claude claude # You'll be prompted to log in on first use That’s it! You’re ready to start coding with Claude. [Continue with Quickstart (5 mins) →](https://docs.anthropic.com/en/docs/claude-code/quickstart) (Got specific setup needs or hit issues? See [advanced setup](https://docs.anthropic.com/en/docs/claude-code/setup) or [troubleshooting](https://docs.anthropic.com/en/docs/claude-code/troubleshooting) .) [​](https://docs.anthropic.com/en/docs/claude-code/overview#what-claude-code-does-for-you) What Claude Code does for you --------------------------------------------------------------------------------------------------------------------------- * **Build features from descriptions**: Tell Claude what you want to build in plain English. It will make a plan, write the code, and ensure it works. * **Debug and fix issues**: Describe a bug or paste an error message. Claude Code will analyze your codebase, identify the problem, and implement a fix. * **Navigate any codebase**: Ask anything about your team’s codebase, and get a thoughtful answer back. Claude Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](https://docs.anthropic.com/en/docs/claude-code/mcp) can pull from external datasources like Google Drive, Figma, and Slack. * **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI. [​](https://docs.anthropic.com/en/docs/claude-code/overview#why-developers-love-claude-code) Why developers love Claude Code ------------------------------------------------------------------------------------------------------------------------------- * **Works in your terminal**: Not another chat window. Not another IDE. Claude Code meets you where you already work, with the tools you already love. * **Takes action**: Claude Code can directly edit files, run commands, and create commits. Need more? [MCP](https://docs.anthropic.com/en/docs/claude-code/mcp) lets Claude read your design docs in Google Drive, update your tickets in Jira, or use _your_ custom developer tooling. * **Unix philosophy**: Claude Code is composable and scriptable. `tail -f app.log | claude -p "Slack me if you see any anomalies appear in this log stream"` _works_. Your CI can run `claude -p "If there are new text strings, translate them into French and raise a PR for @lang-fr-team to review"`. * **Enterprise-ready**: Use Anthropic’s API, or host on AWS or GCP. Enterprise-grade [security](https://docs.anthropic.com/en/docs/claude-code/security) , [privacy](https://docs.anthropic.com/en/docs/claude-code/data-usage) , and [compliance](https://trust.anthropic.com/) is built-in. [​](https://docs.anthropic.com/en/docs/claude-code/overview#next-steps) Next steps ------------------------------------------------------------------------------------- [Quickstart\ ----------\ \ See Claude Code in action with practical examples](https://docs.anthropic.com/en/docs/claude-code/quickstart) [Common workflows\ ----------------\ \ Step-by-step guides for common workflows](https://docs.anthropic.com/en/docs/claude-code/common-workflows) [Troubleshooting\ ---------------\ \ Solutions for common issues with Claude Code](https://docs.anthropic.com/en/docs/claude-code/troubleshooting) [IDE setup\ ---------\ \ Add Claude Code to your IDE](https://docs.anthropic.com/en/docs/claude-code/ide-integrations) [​](https://docs.anthropic.com/en/docs/claude-code/overview#additional-resources) Additional resources --------------------------------------------------------------------------------------------------------- [Host on AWS or GCP\ ------------------\ \ Configure Claude Code with Amazon Bedrock or Google Vertex AI](https://docs.anthropic.com/en/docs/claude-code/third-party-integrations) [Settings\ --------\ \ Customize Claude Code for your workflow](https://docs.anthropic.com/en/docs/claude-code/settings) [Commands\ --------\ \ Learn about CLI commands and controls](https://docs.anthropic.com/en/docs/claude-code/cli-reference) [Reference implementation\ ------------------------\ \ Clone our development container reference implementation](https://github.com/anthropics/claude-code/tree/main/.devcontainer) [Security\ --------\ \ Discover Claude Code’s safeguards and best practices for safe usage](https://docs.anthropic.com/en/docs/claude-code/security) [Privacy and data usage\ ----------------------\ \ Understand how Claude Code handles your data](https://docs.anthropic.com/en/docs/claude-code/data-usage) Was this page helpful? YesNo [Quickstart](https://docs.anthropic.com/en/docs/claude-code/quickstart) On this page * [Get started in 30 seconds](https://docs.anthropic.com/en/docs/claude-code/overview#get-started-in-30-seconds) * [What Claude Code does for you](https://docs.anthropic.com/en/docs/claude-code/overview#what-claude-code-does-for-you) * [Why developers love Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview#why-developers-love-claude-code) * [Next steps](https://docs.anthropic.com/en/docs/claude-code/overview#next-steps) * [Additional resources](https://docs.anthropic.com/en/docs/claude-code/overview#additional-resources) --- # Claude Code on Amazon Bedrock - Anthropic [Anthropic home page![light logo](https://mintcdn.com/anthropic/PF_69UDRSEsLpN9D/logo/light.svg?maxW=143&auto=format&n=PF_69UDRSEsLpN9D&q=85&s=ce64069b841133111e8607800b983754)![dark logo](https://mintcdn.com/anthropic/PF_69UDRSEsLpN9D/logo/dark.svg?maxW=143&auto=format&n=PF_69UDRSEsLpN9D&q=85&s=989a7daec9c66857ab4f6127a3cdec09)](https://docs.anthropic.com/) English Search... Search... Navigation Deployment Claude Code on Amazon Bedrock [Welcome](https://docs.anthropic.com/en/home) [Developer Platform](https://docs.anthropic.com/en/docs/intro) [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) [Model Context Protocol (MCP)](https://docs.anthropic.com/en/docs/mcp) [API Reference](https://docs.anthropic.com/en/api/messages) [Resources](https://docs.anthropic.com/en/resources/overview) [Release Notes](https://docs.anthropic.com/en/release-notes/overview) [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------- Before configuring Claude Code with Bedrock, ensure you have: * An AWS account with Bedrock access enabled * Access to desired Claude models (e.g., Claude Sonnet 4) in Bedrock * AWS CLI installed and configured (optional - only needed if you don’t have another mechanism for getting credentials) * Appropriate IAM permissions [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#setup) Setup --------------------------------------------------------------------------------- ### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#1-enable-model-access) 1\. Enable model access First, ensure you have access to the required Claude models in your AWS account: 1. Navigate to the [Amazon Bedrock console](https://console.aws.amazon.com/bedrock/) 2. Go to **Model access** in the left navigation 3. Request access to desired Claude models (e.g., Claude Sonnet 4) 4. Wait for approval (usually instant for most regions) ### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#2-configure-aws-credentials) 2\. Configure AWS credentials Claude Code uses the default AWS SDK credential chain. Set up your credentials using one of these methods: **Option A: AWS CLI configuration** aws configure **Option B: Environment variables (access key)** 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 **Option C: Environment variables (SSO profile)** aws sso login --profile= export AWS_PROFILE=your-profile-name **Option D: Bedrock API keys** export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key Bedrock API keys provide a simpler authentication method without needing full AWS credentials. [Learn more about Bedrock API keys](https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/) . #### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#advanced-credential-configuration) Advanced credential configuration Claude Code supports automatic credential refresh for AWS SSO and corporate identity providers. Add these settings to your Claude Code settings file (see [Settings](https://docs.anthropic.com/en/docs/claude-code/settings) for file locations). When Claude Code detects that your AWS credentials are expired (either locally based on their timestamp or when Bedrock returns a credential error), it will automatically run your configured `awsAuthRefresh` and/or `awsCredentialExport` commands to obtain new credentials before retrying the request. ##### Example configuration { "awsAuthRefresh": "aws sso login --profile myprofile", "env": { "AWS_PROFILE": "myprofile" } } ##### Configuration settings explained **`awsAuthRefresh`**: Use this for commands that modify the `.aws` directory (e.g., updating credentials, SSO cache, or config files). Output is shown to the user (but user input is not supported), making it suitable for browser-based authentication flows where the CLI displays a code to enter in the browser. **`awsCredentialExport`**: Only use this if you cannot modify `.aws` and must directly return credentials. Output is captured silently (not shown to the user). The command must output JSON in this format: { "Credentials": { "AccessKeyId": "value", "SecretAccessKey": "value", "SessionToken": "value" } } ### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#3-configure-claude-code) 3\. Configure Claude Code Set the following environment variables to enable Bedrock: # Enable Bedrock integration export CLAUDE_CODE_USE_BEDROCK=1 export AWS_REGION=us-east-1 # or your preferred region # Optional: Override the region for the small/fast model (Haiku) export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2 When enabling Bedrock for Claude Code, keep the following in mind: * `AWS_REGION` is a required environment variable. Claude Code does not read from the `.aws` config file for this setting. * When using Bedrock, the `/login` and `/logout` commands are disabled since authentication is handled through AWS credentials. * You can use settings files for environment variables like `AWS_PROFILE` that you don’t want to leak to other processes. See [Settings](https://docs.anthropic.com/en/docs/claude-code/settings) for more information. ### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#4-model-configuration) 4\. Model configuration Claude Code uses these default models for Bedrock: | Model type | Default value | | --- | --- | | Primary model | `us.anthropic.claude-3-7-sonnet-20250219-v1:0` | | Small/fast model | `us.anthropic.claude-3-5-haiku-20241022-v1:0` | To customize models, use one of these methods: # Using inference profile ID export ANTHROPIC_MODEL='us.anthropic.claude-opus-4-1-20250805-v1:0' export ANTHROPIC_SMALL_FAST_MODEL='us.anthropic.claude-3-5-haiku-20241022-v1:0' # Using application inference profile ARN export ANTHROPIC_MODEL='arn:aws:bedrock:us-east-2:your-account-id:application-inference-profile/your-model-id' # Optional: Disable prompt caching if needed export DISABLE_PROMPT_CACHING=1 [Prompt caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) may not be available in all regions ### [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#5-output-token-configuration) 5\. Output token configuration When using Claude Code with Amazon Bedrock, we recommend the following token settings: # Recommended output token settings for Bedrock export CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096 export MAX_THINKING_TOKENS=1024 **Why these values:** * **`CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096`**: Bedrock’s burndown throttling logic sets a minimum of 4096 tokens as the max\_token penalty. Setting this lower won’t reduce costs but may cut off long tool uses, causing the Claude Code agent loop to fail persistently. Claude Code typically uses less than 4096 output tokens without extended thinking, but may need this headroom for tasks involving significant file creation or Write tool usage. * **`MAX_THINKING_TOKENS=1024`**: This provides space for extended thinking without cutting off tool use responses, while still maintaining focused reasoning chains. This balance helps prevent trajectory changes that aren’t always helpful for coding tasks specifically. [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#iam-configuration) IAM configuration --------------------------------------------------------------------------------------------------------- Create an IAM policy with the required permissions for Claude Code: { "Version": "2012-10-17", "Statement": [\ {\ "Effect": "Allow",\ "Action": [\ "bedrock:InvokeModel",\ "bedrock:InvokeModelWithResponseStream",\ "bedrock:ListInferenceProfiles"\ ],\ "Resource": [\ "arn:aws:bedrock:*:*:inference-profile/*",\ "arn:aws:bedrock:*:*:application-inference-profile/*"\ ]\ }\ ] } For more restrictive permissions, you can limit the Resource to specific inference profile ARNs. For details, see [Bedrock IAM documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html) . We recommend creating a dedicated AWS account for Claude Code to simplify cost tracking and access control. [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#troubleshooting) Troubleshooting ----------------------------------------------------------------------------------------------------- If you encounter region issues: * Check model availability: `aws bedrock list-inference-profiles --region your-region` * Switch to a supported region: `export AWS_REGION=us-east-1` * Consider using inference profiles for cross-region access If you receive an error “on-demand throughput isn’t supported”: * Specify the model as an [inference profile](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html) ID [​](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#additional-resources) Additional resources --------------------------------------------------------------------------------------------------------------- * [Bedrock documentation](https://docs.aws.amazon.com/bedrock/) * [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/) * [Bedrock inference profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html) * [Claude Code on Amazon Bedrock: Quick Setup Guide](https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide) Was this page helpful? YesNo [Overview](https://docs.anthropic.com/en/docs/claude-code/third-party-integrations) [Google Vertex AI](https://docs.anthropic.com/en/docs/claude-code/google-vertex-ai) On this page * [Prerequisites](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#prerequisites) * [Setup](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#setup) * [1\. Enable model access](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#1-enable-model-access) * [2\. Configure AWS credentials](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#2-configure-aws-credentials) * [Advanced credential configuration](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#advanced-credential-configuration) * [3\. Configure Claude Code](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#3-configure-claude-code) * [4\. Model configuration](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#4-model-configuration) * [5\. Output token configuration](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#5-output-token-configuration) * [IAM configuration](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#iam-configuration) * [Troubleshooting](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#troubleshooting) * [Additional resources](https://docs.anthropic.com/en/docs/claude-code/amazon-bedrock#additional-resources) ---