claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open Vieufoux opened this issue 7 months ago • 1 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [x] 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?

Vieufoux avatar Jun 27 '25 09:06 Vieufoux

Hello. Maybe is related to the supported countries. Please refer to https://www.anthropic.com/supported-countries to get the list for API and Claude.ai.

Josemboa avatar Jun 27 '25 11:06 Josemboa

This issue seems to persist for me Platform: Anthropic AI OS: MacOS Sonoma 14.5

Dayvvo avatar Jul 14 '25 14:07 Dayvvo

这是来自QQ邮箱的假期自动回复邮件。   你好,我的邮箱安全模式不能回复您的邮件,故如果有急事请打电话或发短信,或qq传递资料。

bill001 avatar Jul 14 '25 14:07 bill001

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   你好,我的邮箱安全模式不能回复您的邮件,故如果有急事请打电话或发短信,或qq传递资料。

bill001 avatar Oct 10 '25 10:10 bill001

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Dec 10 '25 10:12 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   你好,我的邮箱安全模式不能回复您的邮件,故如果有急事请打电话或发短信,或qq传递资料。

bill001 avatar Dec 10 '25 10:12 bill001

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 17 '25 14:12 github-actions[bot]