Configure Claude Code CLI & VSCode extension to use AWS Bedrock
February 20, 2026
•If you’d like to Claude Code to use AWS Bedrock (say because your employer has an AWS account but not an Anthropic account), follow the steps below.
Install Claude Code (if you haven’t already)
brew install claude-code
Generate an AWS Bedrock API Key https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/ (Unless you prefer providing AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or AWS_PROFILE)
Configure Claude Code to use Bedrock and provide a model you’d like it to use (say, Claude Opus 4.5)
vim ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1",
"AWS_BEARER_TOKEN_BEDROCK": "YourAWSBedrockApiKey"
},
"model": "global.anthropic.claude-opus-4-5-20251101-v1:0",
}
If you’d like to list all available models in AWS Bedrock, run
aws bedrock list-foundation-models --query "modelSummaries[].modelId" --region us-east-1 --output text | tr "\t" "\n"
...
nvidia.nemotron-nano-12b-v2
qwen.qwen3-coder-next
anthropic.claude-sonnet-4-20250514-v1:0
anthropic.claude-haiku-4-5-20251001-v1:0
Prefix model ID with global. or us. before adding it to Claude’s Settings file or before providing it to Cursor or a different AI agent
Then, start Claude Code
claude
Configure Claude Code VSCode extension
Configuring Claude Code VSCode extension is surprisingly tricky.
First, create a shell script (say, claude.sh) in your VSCode workspace or in your home directory. In this shell script, export the CLAUDE_CODE_USE_BEDROCK env var and other necessary AWS env vars (On my machine, I exported the AWS_REGION and AWS_PROFILE env vars).
touch ~/.claude.sh
#!/usr/bin/env bash
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION='us-east-1'
export AWS_BEARER_TOKEN_BEDROCK='YourAWSBedrockApiKey'
exec "$@"
chmod +x ~/.claude.sh
Alternatively, if you did create a Claude settings file (~/.claude/settings.json) as described above, modify claude.sh to just be
exec "$@"
On my machine $@ has the value
/Users/nisanth/.vscode/extensions/anthropic.claude-code-2.1.45-darwin-arm64/resources/native-binary/claude --output-format stream-json --verbose --input-format stream-json --max-thinking-tokens 31999 --model us.anthropic.claude-opus-4-5-20251101-v1:0 --permission-prompt-tool stdio --resume ce8ae4da-d609-4e3f-ba95-55b39c05cd2f --mcp-config {"mcpServers":{"claude-vscode":{"type":"sdk","name":"claude-vscode"}}} --setting-sources user,project,local --permission-mode default --include-partial-messages --debug --debug-to-stderr --enable-auth-status --no-chrome
Lastly, open VSCode’s Command Palette and open User Settings JSON or Workspace Settings JSON, add the settings below and either reload or quit/start VSCode.
"claudeCode.disableLoginPrompt": true,
"claudeCode.claudeProcessWrapper": "/Users/chunisan/claude.sh",
"claudeCode.selectedModel": "us.anthropic.claude-opus-4-5-20251101-v1:0",
Use an AWS profile
If you’d like Claude Code to obtain AWS credentials from an AWS profile, provide the AWS_PROFILE env var in Claude settings file (~/.claude/settings.json)
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1",
"AWS_PROFILE:" "LaunchpadV2-dev"
},
"model": "global.anthropic.claude-opus-4-5-20251101-v1:0",
An AWS profile is especially handy when your employer or clients provide you a command or a script (https://docs.aws.amazon.com/sdkref/latest/guide/feature-process-credentials.html#feature-process-credentials-detail-path) to retrieve temporary AWS credentials
# ~/aws/config
[profile LaunchpadV2-dev
credential_process=/Users/nisanth/.toolbox/bin/ada credentials print --profile=LaunchpadV2-dev
Bonus: Add an MCP server
If your employer or clients offer 1 or more MCP servers and you’d like to add those to Claude, you can do so using claude mcp add command https://code.claude.com/docs/en/mcp
For example, to add my client’s MCP server, I ran
claude mcp add --transport stdio --scope user builder-mcp -- builder-mcp