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

Connecting to api.anthropic.com eventhough configured for bedrock

Open sudhakar2do opened this issue 1 year ago • 8 comments

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

sudhakar2do avatar Mar 02 '25 05:03 sudhakar2do

Could you post a screenshot?

bcherny avatar Mar 02 '25 18:03 bcherny

Image

Does this help?

sudhakar2do avatar Mar 03 '25 10:03 sudhakar2do

fwiw have same issue on wsl:

Image

mudduck avatar Mar 03 '25 20:03 mudduck

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.

mckunkel avatar Mar 03 '25 20:03 mckunkel

Thank you for the reports! Should be fixed in latest version

ghost avatar Mar 05 '25 00:03 ghost

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.

vonmike avatar Apr 02 '25 10:04 vonmike

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.

vonmike avatar Apr 27 '25 14:04 vonmike

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 Aug 09 '25 14:08 github-actions[bot]