AWS Builder Center

Running Claude Fable 5 in Claude Code on Amazon Bedrock

Fast setup guide for running Claude Fable 5 in Claude Code on Amazon Bedrock — fix the data-retention error and start using the model in minutes.

Running Claude Fable 5 in Claude Code on Amazon Bedrock

July 01, 2026
Anthropic's Claude Fable 5 is the first model in the Claude 5 family and the debut of the new Mythos-class tier, which sits above Claude Opus in capability. On Amazon Bedrock it can be accessed through the global inference profile  global.anthropic.claude-fable-5 .
If you point Claude Code at it the way you would any other Bedrock model, there is a good chance you'll hit this:
API error: 400 data retention mode 'default' is not available for this model
The short version: Bedrock only serves Fable 5 to accounts that have opted in to the  provider_data_share  data-retention mode ( Anthropic explains this here ), and because the model sits behind a global inference profile, you have to opt in in every region the profile routes to — not just the one in your  AWS_REGION .
This post walks through the full setup, including the fix.

TL;DR

# 1. Claude Code → Bedrock
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key>

# 2. One-time: allow the API key's IAM user to change the data-retention mode
aws iam put-user-policy \
--user-name BedrockAPIKey-xxxx \
--policy-name AllowBedrockPutAccountDataRetention \
--policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"bedrock:PutAccountDataRetention","Resource":"*"}]}'

# 3. Opt in to provider_data_share
curl -X PUT "https://bedrock.us-east-1.amazonaws.com/data-retention" \
-H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
-H "Content-Type: application/json" \
-d '{ "mode": "provider_data_share" }'

# 4. In Claude Code
/model global.anthropic.claude-fable-5

Prerequisites

  • Claude Code installed (CLI, desktop app, or IDE extension).
  • An AWS account with Bedrock model access granted for the Claude 5 models (Bedrock console → Model access).
  • A Bedrock API key (these are backed by an auto-generated IAM user named  BedrockAPIKey-<suffix> ), or IAM credentials with the usual  bedrock:InvokeModel*  permissions.
  • Admin-capable AWS credentials for a one-time IAM policy change.

Step 1 — Point Claude Code at Bedrock

The standard wiring:
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=eu-north-1
export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key> # or use an AWS profile/role
You can persist the non-secret parts in  ~/.claude/settings.json :
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "eu-north-1"
}
}
Keep the API key itself in your shell environment or a secret manager — not in dotfiles you might commit.

Step 2 — Select Fable 5 (and meet the 400)

Inside Claude Code:
/model global.anthropic.claude-fable-5
…and instead of a confirmation, you may get:
API error: 400 data retention mode 'default' is not available for this model

What's actually going on

Fable 5 ships with additional safety measures for dual-use capabilities, and on Bedrock it is only served to accounts that have switched their account-level data-retention mode from  default  to  provider_data_share  — i.e. you agree that request data can be shared with the model provider (Anthropic) under the terms in the model's EULA.
Two properties of this setting matter for the fix:
  1. It's controlled by a small REST API on the Bedrock control plane ( PUT /data-retention ), gated by the IAM action  bedrock:PutAccountDataRetention .
  1. It's account-level. One opt-in applies to your entire account. Once set, requests through global inference profiles (which route across multiple regions for throughput) will work regardless of which region processes the request.


Step 3 — Try the PUT and read the error to find your IAM user

Call the data-retention endpoint with your Bedrock API key:
curl -X PUT https://bedrock.eu-north-1.amazonaws.com/data-retention \
-H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
-H "Content-Type: application/json" \
-d '{ "mode": "provider_data_share" }'
If the key's IAM user doesn't have the permission yet, you'll get an AccessDenied-style response. The exact wording varies, but it contains the one piece of information you need — the ARN of the IAM user backing your API key:
User: arn:aws:iam::123456789012:user/BedrockAPIKey-bzby is not authorized
to perform: bedrock:PutAccountDataRetention
Bedrock API keys are backed by auto-generated IAM users named  BedrockAPIKey-<suffix> . That user is the principal that needs the permission.

Step 4 — Grant  bedrock:PutAccountDataRetention 

Switch to admin-capable credentials and attach an inline policy to that user:
export AWS_PROFILE=default # an admin-capable profile

aws iam put-user-policy \
--user-name BedrockAPIKey-bzby \
--policy-name AllowBedrockPutAccountDataRetention \
--policy-document '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "bedrock:PutAccountDataRetention",
"Resource": "*"
}
]
}'

Step 5 — Opt in to  provider_data_share 

Now re-run the PUT with your Bedrock API key:
curl -X PUT https://bedrock.us-east-1.amazonaws.com/data-retention \
-H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
-H "Content-Type: application/json" \
-d '{ "mode": "provider_data_share" }'
A successful call echoes the new state:
{"mode":"provider_data_share","updatedAt":"2026-06-11T14:10:45.396Z"}
The call is idempotent — re-running it is harmless.

Step 6 — Verify

Back in Claude Code:
/model global.anthropic.claude-fable-5
This time it sticks:
Set model to Fable 5 and saved as your default for new sessions
Ask the model which model it is, or check  /status , to confirm end to end. You can also pin it outside the UI with  ANTHROPIC_MODEL=global.anthropic.claude-fable-5  or  claude --model global.anthropic.claude-fable-5 .

Notes and gotchas

  • This is an account-level setting, not a Claude Code setting.  provider_data_share  changes how request data is handled for Bedrock in that account — review the model's EULA and clear it with your security/compliance team before flipping it, especially on accounts with regulated workloads.
  • The curl runs as the API key's user, not your CLI profile. The  aws iam put-user-policy  call uses your admin profile; the  curl  with the bearer token authenticates as  BedrockAPIKey-<suffix> . Don't confuse the two principals when debugging AccessDenied.
  • Clean up if you like. The retention flip is a one-time operation, so you can remove the inline policy afterwards:```bash aws iam delete-user-policy --user-name BedrockAPIKey-bzby --policy-name AllowBedrockPutAccountDataRetention```

  • Background tasks use a small model. Claude Code also uses a fast model for housekeeping; on Bedrock you can point that at a Haiku inference profile via  ANTHROPIC_SMALL_FAST_MODEL  if you want everything on Bedrock.

Wrap-up

The whole fix is three commands: one  aws iam put-user-policy  and one  curl -X PUT . The non-obvious parts are that Fable 5 is gated on  provider_data_share  at all, and that the AccessDenied message is how you discover the IAM user behind a Bedrock API key.
Happy shipping — Fable 5 in Claude Code through Amazon Bedrock is worth the detour.
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