[PR #3986] [MERGED] fix to support: feat2864 - using local credentials file with Amazon Bedrock #4488

Closed
opened 2026-02-22 18:35:56 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3986
Author: @nonatofabio
Created: 6/12/2025
Status: Merged
Merged: 7/2/2025
Merged by: @timothycarambat

Base: masterHead: fix-feat2864


📝 Commits (2)

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 server/utils/AiProviders/bedrock/index.js (+3 -2)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

connect #2864

What is in this change?

This PR fixes an authentication bug in the AWS Bedrock provider where passing an empty object {} as credentials caused the AWS SDK to reject the configuration with the error:
Resolved credential object is not valid.

The credentials getter in server/utils/AiProviders/bedrock/index.js now returns undefined instead of {} for iam_role and default cases. This enables the AWS SDK to correctly fall back to its default credential provider chain (e.g., local credentials file, environment, or EC2/ECS IAM role), restoring support for local development and environments that use assumed roles.

Additional Information

Verified that returning undefined allows the AWS SDK to use local credentials as expected.
No other logic or side effects are introduced by this change.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • [] Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/3986 **Author:** [@nonatofabio](https://github.com/nonatofabio) **Created:** 6/12/2025 **Status:** ✅ Merged **Merged:** 7/2/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `fix-feat2864` --- ### 📝 Commits (2) - [`ed79e81`](https://github.com/Mintplex-Labs/anything-llm/commit/ed79e81740583ab8442afafe30abfd1db782bce5) fix: feat2864 - [`c1bfca8`](https://github.com/Mintplex-Labs/anything-llm/commit/c1bfca88d9d1b9e085d18801d802791e4713d799) patch default case ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/bedrock/index.js` (+3 -2) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> connect #2864 ### What is in this change? This PR fixes an authentication bug in the AWS Bedrock provider where passing an empty object {} as credentials caused the AWS SDK to reject the configuration with the error: Resolved credential object is not valid. The credentials getter in server/utils/AiProviders/bedrock/index.js now returns undefined instead of {} for iam_role and default cases. This enables the AWS SDK to correctly fall back to its default credential provider chain (e.g., local credentials file, environment, or EC2/ECS IAM role), restoring support for local development and environments that use assumed roles. ### Additional Information Verified that returning undefined allows the AWS SDK to use local credentials as expected. No other logic or side effects are introduced by this change. ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:35:56 -05:00
yindo closed this issue 2026-02-22 18:35:56 -05:00
yindo changed title from [PR #3986] fix to support: feat2864 - using local credentials file with Amazon Bedrock to [PR #3986] [MERGED] fix to support: feat2864 - using local credentials file with Amazon Bedrock 2026-06-05 15:18:49 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4488