Skip to content

[BUG] Claude CLI on WSL in China fails with ‘unsupported country/region’ error #2656

Description

@Vieufoux

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: 1.0.35
  • Operating System: Windows WSL(Ubuntu 22.04)
  • AWS Region tested: cn-northwest-1 (Ningxia), ap-northeast-2 (Seoul)

Bug Description

When I invoke claude from my WSL Ubuntu in China (using Bedrock), I immediately get:

API Error: 400 Access to Anthropic models is not allowed from unsupported countries, regions, or territories. 
Please refer to https://www.anthropic.com/supported-countries for more information.

However, if I launch an EC2 instance in ap-northeast-2 and run the exact same steps there, Claude works fine. Even on an EC2 in cn-northwest-1 it fails with the same unsupported‐region error. My understanding is that Bedrock’s Anthropic models should be reachable from China regions (via the public AWS endpoints).

Steps to reproduce

  1. In WSL Ubuntu 22.04 (or EC2 in cn-northwest-1):
    a. Install Node/NPM & AWS CLI
    b. aws configure (with valid credentials)
    c. export CLAUDE_CODE_USE_BEDROCK=1
    d. export AWS_REGION=cn-northwest-1
    e. run claude, then type “Hello”
  2. Observe the 400 “unsupported country/region” error
  3. Repeat steps on an EC2 in ap-northeast-2 → no error, Claude responds normally.

Expected behavior
I should be able to call Claude via Bedrock in any AWS region—even cn-northwest-1—without hitting an “unsupported region” error.

Questions / Additional info
• Do I need to explicitly configure a proxy or custom endpoint for China regions?
• Is there a Bedrock-CLI setting in @anthropic/claude or the AWS SDK that I’m missing?
• Could this be a networking restriction from my local environment (China)…or something baked into the CLI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:bedrockIssue relates to AWS BedrockbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions