Skip to content

[BUG] Claude Code Bedrock Model Configuration Error #1434

Description

@cloudeep-innovation

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version:
  • Operating System:
  • Terminal:

Bug Description

Unable to configure Claude Code to use AWS Bedrock with Claude Sonnet 4. Getting a "provided model identifier is invalid" error when attempting to set the global configuration for Bedrock usage.

Steps to Reproduce

  1. Run the following command to configure Claude Code for AWS Bedrock:
    claude config set --global env '{"CLAUDE_CODE_USE_BEDROCK": "true", "ANTHROPIC_MODEL": "apac.anthropic.claude-sonnet-4-20250514-v1:0"}'
  2. Attempt to use Claude Code with the Bedrock configuration
  3. Error occurs immediately

Expected Behavior

Claude Code should successfully configure to use AWS Bedrock with Claude Sonnet 4 model and allow normal operation through Bedrock API.

Actual Behavior

Configuration fails with the following error:

API Error (apac.anthropic.claude-sonnet-4-20250514-v1:0): 400 The provided model identifier is invalid.

arn:aws:bedrock:ap-northeast-1:XXXX:inference-profile/apac.anthropic.claude-sonnet-4-20250514-v1:0

Interrupted by user

Additional Context

  • Using AWS region: ap-northeast-1 (Asia Pacific - Tokyo)
  • The error shows Claude Code is attempting to construct an ARN with an inference profile
  • The model identifier format apac.anthropic.claude-sonnet-4-20250514-v1:0 appears to be incorrect for AWS Bedrock
  • Standard Bedrock model identifiers typically use format like anthropic.claude-3-5-sonnet-20241022-v2:0
  • May be related to regional model availability or incorrect model ID format for Bedrock

Metadata

Metadata

Assignees

Labels

api:bedrockIssue relates to AWS Bedrockarea:modelbugSomething isn't workinghas reproHas detailed reproduction steps

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions