claude-code - 💡(How to fix) Fix [FEATURE] Dedicated AWS profile config for Bedrock requests [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47912Fetched 2026-04-15 06:38:50
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

Fix Action

Fix / Workaround

No workaround exists

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

When using Claude Code with AWS Bedrock, the only supported way to isolate the Bedrock AWS profile from the shell's active AWS_PROFILE is to set AWS_PROFILE. This works, but it has a side-effect: it propagates the Bedrock-specific AWS profile to bash commands.

Engineers often work across multiple AWS accounts simultaneously - for example:

  • AWS account A: Bedrock billing account (the one Claude Code should use)
  • AWS account B: active dev/infra account (the one all other CLI tools like aws, terraform, kubectl should use).

This issue was raised in #148 and closed for inactivity.

Proposed Solution

introducing additional env variable like CLAUDE_CODE_AWS_PROFILE or CLAUDE_CODE_AWS_PROFILE_BEDROCK which for Claude Code takes precedence over AWS_PROFILE

Alternative Solutions

No workaround exists

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

No response

Additional Context

No response

extent analysis

TL;DR

Introducing an additional environment variable, such as CLAUDE_CODE_AWS_PROFILE, can help isolate the Bedrock AWS profile from the shell's active AWS profile without propagating it to other bash commands.

Guidance

  • Consider adding a new environment variable, like CLAUDE_CODE_AWS_PROFILE, to allow Claude Code to use a specific AWS profile without affecting the shell's active profile.
  • Evaluate the precedence of this new variable over AWS_PROFILE to ensure it works as expected in Claude Code.
  • Assess the potential impact of this change on existing workflows and scripts that rely on the current behavior.
  • Investigate how to document and communicate this new variable to users to ensure smooth adoption.

Notes

The introduction of a new environment variable may require updates to documentation, user guides, and potentially the code itself to handle the new variable correctly.

Recommendation

Apply workaround: Introduce a new environment variable like CLAUDE_CODE_AWS_PROFILE to isolate the Bedrock AWS profile, as it provides a straightforward solution to the problem without requiring significant changes to the existing infrastructure.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Dedicated AWS profile config for Bedrock requests [1 comments, 2 participants]