Annoying AWS credential warning when both AWS_PROFILE and static credentials are present

Resolved 💬 3 comments Opened Oct 1, 2025 by perrwa Closed Jan 8, 2026

User Story

As a developer using Claude Code alongside other AWS tools (like dbt, Terraform, etc.), I want to configure both AWS_PROFILE for Claude/Bedrock access and static credentials for other tools without receiving repetitive warnings, so that I can have a clean command-line experience.

Problem Description

Users receive this warning every time they run the claude command:

@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
    Multiple credential sources detected: 
    Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
    This SDK will proceed with the AWS_PROFILE value.
    
    However, a future version may change this behavior to prefer the ENV static credentials.
    Please ensure that your environment only sets either the AWS_PROFILE or the
    AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.

Why This Is Problematic

This is a very common scenario for developers who need:

  • AWS_PROFILE for Claude Code (Bedrock access)
  • AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY for other tools (dbt, CI/CD pipelines, Terraform, etc.)

The warning is:

  • Confusing: Suggests there's an error when both credentials are intentionally configured
  • Repetitive: Appears every single time claude is run
  • Annoying: Creates noise in the command-line experience
  • Misleading: Both credential types serve legitimate, different purposes

Steps to Reproduce

  1. Set AWS_PROFILE in your environment (needed for Claude/Bedrock):

``bash
export AWS_PROFILE=your-profile-name
``

  1. Set static AWS credentials (needed for other tools):

``bash
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=secret...
``

  1. Run any claude command:

``bash
claude --version
``

  1. Result: Warning appears every time

Expected Behavior

  • Ideal: No warning when both credential types are present (since this is a valid use case)
  • Alternative: One-time informational message that can be suppressed
  • Minimum: Less alarming warning message that acknowledges this is often intentional

Proposed Solutions

  1. Suppress AWS SDK warnings when both credential types are present (most user-friendly)
  2. Add configuration option to disable credential warnings (--no-aws-warnings flag or config setting)
  3. Improve warning message to be less alarming and acknowledge valid use cases
  4. Add documentation explaining this common multi-tool scenario

Environment

  • OS: macOS (Darwin 24.6.0)
  • Scenario: Developer using Claude Code + dbt + other AWS tooling
  • Frequency: Every claude command invocation

Impact

This affects any developer who:

  • Uses Claude Code for AI assistance
  • Uses other AWS tools requiring static credentials
  • Values a clean command-line experience

Additional Context

This warning comes from the AWS SDK's credential provider, not Claude Code directly, but Claude Code could suppress or handle these warnings to improve user experience.

The warning is cosmetic only - Claude Code works perfectly fine, but the user experience is degraded by the constant warning noise.

View original on GitHub ↗

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