claude-code - 💡(How to fix) Fix [DOCS] Bedrock `awsCredentialExport` docs omit always-run behavior for cross-account auth [1 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#58876Fetched 2026-05-14 03:37:16
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

When Claude Code detects that your AWS credentials are expired (either locally based on their timestamp or when Bedrock returns a credential error), it will automatically run your configured awsAuthRefresh and/or awsCredentialExport commands to obtain new credentials before retrying the request. These docs still describe awsCredentialExport as a helper Claude Code runs only after credentials are expired or Bedrock returns a credential error. | https://code.claude.com/docs/en/amazon-bedrock | Advanced credential configuration currently describes awsCredentialExport only as an expiry/error retry helper |

RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/amazon-bedrock

Section/Topic

Advanced credential configuration, especially the awsCredentialExport explanation

Current Documentation

The Bedrock page currently says:

When Claude Code detects that your AWS credentials are expired (either locally based on their timestamp or when Bedrock returns a credential error), it will automatically run your configured awsAuthRefresh and/or awsCredentialExport commands to obtain new credentials before retrying the request.

awsCredentialExport: Only use this if you can't modify .aws and must directly return credentials. Output is captured silently and not shown to the user.

The settings reference also currently says:

awsCredentialExport | Custom script that outputs JSON with AWS credentials (see advanced credential configuration)

What's Wrong or Missing?

These docs still describe awsCredentialExport as a helper Claude Code runs only after credentials are expired or Bedrock returns a credential error.

That is outdated for the v2.1.141 behavior change: when awsCredentialExport is configured, Claude Code now always runs it instead of skipping it when ambient AWS credentials already resolve. Without documenting that precedence, Bedrock users who rely on exported credentials for cross-account access can reasonably assume Claude Code will keep using ambient credentials until they expire, which does not match the current behavior.

The current wording also does not explain why someone would choose awsCredentialExport over ambient credentials or awsAuthRefresh for cross-account Bedrock authentication.

Suggested Improvement

Update the Bedrock page so awsCredentialExport documents its current precedence and intended use case.

Before:

When Claude Code detects that your AWS credentials are expired ... it will automatically run your configured awsAuthRefresh and/or awsCredentialExport commands ... before retrying the request.

After:

awsAuthRefresh runs when Claude Code needs to refresh credentials stored in .aws.

If awsCredentialExport is configured, Claude Code always runs it to obtain request credentials, even when ambient AWS credentials already resolve. Use this when Claude Code must assume or export a different credential set than the ambient AWS SDK chain provides, such as cross-account Bedrock access.

Also add a short note in the settings reference entry for awsCredentialExport that points back to this always-run cross-account behavior.

Impact

High - Prevents users from using a feature

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/amazon-bedrockAdvanced credential configuration currently describes awsCredentialExport only as an expiry/error retry helper
https://code.claude.com/docs/en/settingsawsCredentialExport settings entry links back to the Bedrock page but does not summarize the always-run behavior

Total scope: 2 pages affected

Version context: This gap is about the Bedrock authentication behavior documented after v2.1.141.

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 [DOCS] Bedrock `awsCredentialExport` docs omit always-run behavior for cross-account auth [1 participants]