Connecting to api.anthropic.com eventhough configured for bedrock
For the following configuration I see the claude is still accessing api.anthropic.com
export CLAUDE_CODE_USE_BEDROCK=1
export ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0'
export DISABLE_PROMPT_CACHING=1
export AWS_ACCESS_KEY_ID='ID'
export AWS_SECRET_ACCESS_KEY='KEY'
export AWS_REGION='us-west-2'
export AWS_PROFILE=
export https_proxy="proxy"
> claude
I see the following:
â â» Welcome to Claude Code research preview! â
â°âââââââââââââââââââââââââââââââââââââââââââââ¯
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: fetch failed
Please check your internet connection and network settings.
Note: Claude Code might not be available in your country. Check supported
countries at https://anthropic.com/supported-countries
Note I am behind a firewall and have access to AWS bedrock but not to api.anthropic
8 Comments
Could you post a screenshot?
!Image
Does this help?
fwiw have same issue on wsl:
!Image
I have the same issue with the same setup. I am able to invoke us.anthropic.claude-3-7-sonnet-20250219-v1:0 from the machine I am trying to run claude-code on via aws bedrock call.
Thank you for the reports! Should be fixed in latest version
Still getting the same issue with 0.2.29 (Claude Code)
And this is also not related to the link of timeout issue #410
You get the error while running the "claude" command.
There is also no debug/verbose option to get more details.
I've run wireshark to get more information and I am getting the following handshake errors:
453 HTTP error on Client Hello (SNI=api.anthropic.com) using TLSv1.3 protocol.
457 HTTP error on Client Hello (SNI=console.anthropic.com) using TLSv1.3 protocol.
457 HTTP error on Client Hello (SNI=statsig.anthropic.com) using TLSv1.3 protocol.
Was resolved after updating openssl version on the machine.
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.