Skip to content

Conversation

@bainos
Copy link
Contributor

@bainos bainos commented Jan 14, 2026

Closes #8454

Feature

Adds AWS Web Identity Token File (EKS IRSA) authentication support for Amazon Bedrock.

Implementation

  • Detect AWS_WEB_IDENTITY_TOKEN_FILE environment variable to enable autoload
  • Conditionally set credentialProvider only when no bearer token exists
  • Maintain authentication precedence: bearer token → credential chain

Changes

  • provider.ts: Conditional credentialProvider based on auth method
  • amazon-bedrock.test.ts: Add web identity token test + fix existing test cleanup
  • auth.ts, providers.mdx: Update documentation

Verification

Tested with real EKS IRSA credentials. All tests pass. No regressions in bearer token or access key authentication.

  Adds AWS Web Identity Token File (EKS IRSA) authentication support for Amazon Bedrock.

  ## Implementation
  - Detect `AWS_WEB_IDENTITY_TOKEN_FILE` environment variable to enable autoload
  - Conditionally set `credentialProvider` only when no bearer token exists
  - Maintain authentication precedence: bearer token → credential chain

  ## Changes
  - `provider.ts`: Conditional credentialProvider based on auth method
  - `amazon-bedrock.test.ts`: Add web identity token test + fix existing test cleanup
  - `auth.ts`, `providers.mdx`: Update documentation

  ## Verification
  Tested with real EKS IRSA credentials. All tests pass. No regressions in bearer token or access key authentication.
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found Related PR

PR #7502: feat(bedrock): support AWS_SHARED_CREDENTIALS_FILE for autoload

Why it's related: This is a similar feature that adds AWS credential detection for Bedrock. While PR #8461 adds support for AWS Web Identity Token File (EKS IRSA), PR #7502 adds support for AWS_SHARED_CREDENTIALS_FILE. Both involve:

  • Detecting environment variables to enable autoload
  • Conditional credential provider setup
  • Maintaining authentication precedence
  • Testing with Bedrock authentication

These appear to be complementary features rather than duplicates, both improving AWS authentication support for the Bedrock provider with different credential methods.

@loretoparisi
Copy link

+1

1 similar comment
@andreafspeziale
Copy link

+1

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 3a9e6b5 into anomalyco:dev Jan 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add AWS Web Identity Token File (EKS IRSA) support for Bedrock

4 participants