[BUG] Proxy configuration ignored when CLAUDE_CODE_USE_BEDROCK=1

Resolved 💬 5 comments Opened Jun 26, 2025 by nozaq Closed Jul 1, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [x] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.35 (Claude Code)
  • Operating System: Debian 12(bookworm)
  • Terminal: zsh on vscode terminal

Bug Description

<!-- A clear and concise description of the bug -->

When using the Amazon Bedrock API, proxy configurations such as https_proxy and http_proxy are ignored.
In our environment, direct internet access is not available, so Claude Code should use the proxy server to connect to the Amazon Bedrock API.

Steps to Reproduce

  1. Set the following environment variables:
  • https_proxy: http://proxy:3128
  • http_proxy: http://proxy:3128
  • CLAUDE_CODE_USE_BEDROCK: 1
  • AWS_REGION: us-east-1
  1. Launch Claude Code from the command line: $ claude
  2. Send a prompt.

Expected Behavior

<!-- What you expected to happen -->

Sending a prompt should succeed, and the response should be returned from the Amazon Bedrock API.

Actual Behavior

Sending a prompt returns an error

> test prompt
  ⎿  API Error: AggregateError

strace.log shows the strace output from the above process.

It shows that the Claude Code process tries the following without using the proxy server:

  1. Queries portal.sso.us-east-1.amazonaws.com to the DNS server.
  2. Attempts to connect to the following IP addresses (failed).
  • 54.224.185.190
  • 34.200.27.237
  • 184.73.66.185

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

  • /status reports that the proxy config is set: status.log
  • If we unset CLAUDE_CODE_USE_BEDROCK and log in with a Claude account, it successfully connects to the Anthropic API using our proxy configuration.
  • PoC repo is available at https://github.com/nozaq/cc-poc.

Please let me know if you need more information.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗