AWS Builder Center
Running Claude Code and Claude Desktop on Amazon Bedrock

Running Claude Code and Claude Desktop on Amazon Bedrock

This article walks through configuring both Claude Code (terminal CLI) and Claude Desktop (Cowork) to use Amazon Bedrock as the inference backend — no Anthropic API key or subscription required. Claude Code needs two environment variables in ~/.claude/settings.json. Claude Desktop needs a few fields in the built-in Setup UI. Both share the same AWS credentials and Bedrock model access. The entire setup, including troubleshooting, was done through AI-assisted development with Kiro.

In a  previous post , we covered how to run the Claude Agent SDK (Python) on  Amazon Bedrock  with just two environment variables. This post continues the series, covering the other two main ways developers interact with Claude daily: the terminal CLI and the desktop app.
If you're already in the AWS ecosystem, routing Claude through  Amazon Bedrock  keeps your data in your own account, bills through your existing AWS agreement, and eliminates the need for a separate Anthropic subscription. This post covers two scenarios:
  • Scenario A: Claude Code CLI — the terminal-based coding tool
  • Scenario B: Claude Desktop (Cowork 3P) — the GUI desktop app
Both use the same AWS IAM user and Bedrock model access.

Prerequisites (Shared)

Before either scenario, make sure you have:
  1. AWS CLI installed and credentials configured
aws --version
aws sts get-caller-identity
  1. Bedrock model access enabled — Serverless foundation models on  Amazon Bedrock  are now automatically enabled when first invoked. However, for Anthropic models, first-time users may need to submit use case details before access is granted. Simply select a model from the Model catalog and try invoking it — you'll be prompted if any additional steps are needed.
  1. IAM permissions — Your IAM user or role needs:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:ListInferenceProfiles",
"bedrock:GetInferenceProfile"
],
"Resource": [
"arn:aws:bedrock:*:*:inference-profile/*",
"arn:aws:bedrock:*:*:application-inference-profile/*",
"arn:aws:bedrock:*:*:foundation-model/*"
]
}
]
}
  1. Know your inference profile IDs — Bedrock requires cross-region inference profile IDs (with a region prefix like  us. ), not bare model IDs. The ones used in this post:
Model
Inference Profile ID
Claude Opus 4.7
 us.anthropic.claude-opus-4-7 
Claude Opus 4.6
 us.anthropic.claude-opus-4-6-v1 

Scenario A: Claude Code CLI

Claude Code is Anthropic's terminal-based AI coding tool. Install it via npm:
npm install -g @anthropic-ai/claude-code

Step 1: Edit settings.json

The cleanest approach is writing the Bedrock configuration into Claude Code's settings file, so you don't need to export environment variables every time.
Edit  ~/.claude/settings.json :
{
"model": "us.anthropic.claude-opus-4-6-v1",
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1"
}
}
Two key fields:
  •  CLAUDE_CODE_USE_BEDROCK : Tells Claude Code to use Bedrock instead of the Anthropic API.
  •  AWS_REGION : Required. Claude Code does not read this from  ~/.aws/config .
The  model  field uses the Bedrock inference profile ID. Without it, Claude Code picks its own default.

Step 2: Run and Verify

claude
Inside Claude Code, run  /status . You should see:
API provider: Amazon Bedrock
AWS region: us-east-1
Model: us.anthropic.claude-opus-4-6-v1
That's it. Claude Code picks up your AWS credentials through the standard SDK credential chain ( ~/.aws/credentials , environment variables, IAM role, SSO profile).

Switching Models

There are two ways to switch models:
At runtime — Inside Claude Code, use the  /model  command:
/model us.anthropic.claude-opus-4-7
This switches immediately without restarting. Use  /model us.anthropic.claude-opus-4-6-v1  to switch back.
Permanently — Change the  model  field in  ~/.claude/settings.json :
{
"model": "us.anthropic.claude-opus-4-7",
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1"
}
}
Restart Claude Code ( /exit , then  claude ) for the change to take effect.

Optional: Install Skills

Claude Code supports Skills — packaged instructions that extend Claude's capabilities. Anthropic publishes an official set at  github.com/anthropics/skills .
To install them, run inside Claude Code:
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills
/plugin install example-skills@anthropic-agent-skills
/reload-plugins
This gives you skills like  mcp-builder ,  webapp-testing ,  claude-api , document generation (docx/pdf/pptx/xlsx), and more.
After installation, your  ~/.claude/settings.json  will be updated automatically with the new plugin entries:
{
"model": "us.anthropic.claude-opus-4-6-v1",
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1"
},
"enabledPlugins": {
"document-skills@anthropic-agent-skills": true,
"example-skills@anthropic-agent-skills": true
},
"extraKnownMarketplaces": {
"anthropic-agent-skills": {
"source": {
"source": "github",
"repo": "anthropics/skills"
}
}
}
}
Compared to the base configuration in Step 1, two new sections are added:
  •  enabledPlugins : Tracks which Skills are active.
  •  extraKnownMarketplaces : Records the GitHub source for the Skills marketplace.

Example: Turning a Blog Post into a Slide Deck

Once Skills are installed, you can use them directly in Claude Code. For example, I previously wrote a blog post  "Deploying OpenClaw on Amazon EC2 - A Developer's Perspective" , covering one-click CloudFormation deployment, VPC Endpoints security architecture, and multi-region inference profile configuration. It's a detailed post. If I needed to present this topic at a developer conference the next day, building slides manually would take too long. With the  pptx  skill, it takes one command:
❯ /example-skills:pptx
⏺ PPTX skill loaded. What presentation would you like me to create?

❯ Turn the following blog post into a slide deck:
https://builder.aws.com/content/3CQFzc91nM9sGkfHRbpjo4eXojf/deploying-openclaw-on-amazon-ec2-a-developers-perspective
Claude Code reads the blog, extracts the architecture descriptions, deployment steps, and key configurations, organizes them into well-structured slides, and generates a  .pptx  file — all within the terminal, powered by  Amazon Bedrock . From blog post to presentation-ready slides in a single command.

Scenario B: Claude Desktop (Cowork 3P)

Claude Desktop can run in "third-party platform" mode, using Bedrock for inference instead of Anthropic's own servers. This is called Cowork 3P.

Step 1: Open the Setup UI

  1. Open Claude Desktop (you don't need to log in)
  1. Go to Help → Troubleshooting → Enable Developer mode
  1. Go to Developer → Configure third-party inference
This opens the built-in configuration UI.

Step 2: Configure Bedrock

Fill in the following fields:
Field
Value
Inference provider
Bedrock (select the radio button)
AWS region
 us-east-1 
AWS bearer token
Leave empty
Bedrock base URL
Leave empty
AWS profile name
 default 
AWS config directory
Leave empty (uses  ~/.aws  by default)
Under IDENTITY & MODELS:
Field
Value
Model list
 us.anthropic.claude-opus-4-6-v1 
The model list uses Bedrock inference profile IDs. You can add multiple models — click + Add for each one. The first entry becomes the default.
Configure third party inference #1

Configure third party inference #2


Step 3: Apply and Relaunch

  1. Click Apply locally at the bottom of the Setup UI
  1. Fully quit Claude Desktop (Cmd+Q on macOS)
  1. Reopen Claude Desktop
After relaunch, Claude Desktop shows the Bedrock login screen — no Anthropic account needed, just your AWS credentials:
Amazon Bedrock login way - no anthropic account needed


Step 4: Verify

After relaunch, you should see:
  • Bottom-left corner shows Cowork 3P | Bedrock
  • The model picker shows  us.anthropic.claude-opus-4-6-v1 
  • Claude responds and identifies itself as running on the Bedrock model
Send a test message like "What version of the model are you currently using?" — Claude should confirm it's powered by  claude-opus-4-6-v1  in Cowork mode.
Setting to Claude Opus 4.6 model


Adding More Models Later

To add models (e.g., Opus 4.7) after initial setup:
  1. In the macOS menu bar, go to Help → Troubleshooting → Enable Developer mode
  1. A Developer menu appears in the menu bar — click Developer → Configure third-party inference
  1. Under Model list, click + Add and enter  us.anthropic.claude-opus-4-7 
  1. Click Apply locally, then Cmd+Q and reopen Claude Desktop
The model picker at the bottom of the chat window will now show all configured models.
Setting to Claude Opus 4.7 model


How It Works Under the Hood

When you set AWS profile name to  default , Claude Desktop reads your  ~/.aws/credentials  and  ~/.aws/config  files to authenticate with Bedrock. The three authentication methods are:
Method
When to use
AWS bearer token
If you have a Bedrock API key
AWS profile name
If you have standard AWS credentials (this is what we used)
Credential helper
For enterprise SSO setups with rotating credentials
You only need one of the three. The Setup UI validates the configuration and writes it to  ~/Library/Application Support/Claude-3p/claude_desktop_config.json  on macOS.

Important: Use the Setup UI

During this setup, I first tried manually editing the  claude_desktop_config.json  file. This resulted in a persistent "Your provider setup needs a fix" error. The Setup UI handles the correct format and field validation automatically — use it instead of hand-editing the JSON.

Troubleshooting

"on-demand throughput isn't supported" — You're using a bare model ID instead of an inference profile ID. Use the  us.  prefixed IDs (e.g.,  us.anthropic.claude-opus-4-6-v1 ).
"Your provider setup needs a fix" in Claude Desktop — Don't hand-edit the config JSON. Use the Setup UI (Developer → Configure third-party inference) and click Apply locally.
Claude Code  /status  doesn't show Bedrock — Make sure  CLAUDE_CODE_USE_BEDROCK  is set to  "1"  in  ~/.claude/settings.json  under the  env  key. Restart Claude Code after changing settings.
AWS credentials not found — Claude Code uses the standard AWS SDK credential chain. Verify with  aws sts get-caller-identity . For Claude Desktop, make sure the AWS profile name matches a profile in  ~/.aws/credentials .

Summary


Claude Code CLI
Claude Desktop (Cowork 3P)
Config location
 ~/.claude/settings.json 
Setup UI → Apply locally
Key setting
 CLAUDE_CODE_USE_BEDROCK=1 
 inferenceProvider: bedrock 
Auth method
AWS SDK credential chain
AWS profile name
Model format
Inference profile ID
Inference profile ID
Verify
 /status  in Claude Code
Bottom-left shows "Cowork 3P | Bedrock"
Both scenarios use the same AWS credentials and Bedrock model access. Once you have one working, the other is straightforward.

A Note on the Setup Process

This entire configuration — both scenarios, including troubleshooting the Claude Desktop JSON format issue — was completed through conversation with  Kiro , an AI-powered IDE.  Kiro  checked the AWS environment, verified IAM permissions, wrote the settings files, researched the official documentation, and diagnosed the Setup UI requirement for Claude Desktop — all without leaving the IDE.


Tested with Claude Code 2.1.123, Claude Desktop (Cowork 3P), Claude Opus 4.6 & 4.7 on  Amazon Bedrock , us-east-1
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article