[PR #2632] [MERGED] feat: support for iam roles for bedrock client #4051

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2632
Author: @dannysteenman
Created: 11/14/2024
Status: Merged
Merged: 5/6/2025
Merged by: @timothycarambat

Base: masterHead: master


📝 Commits (5)

  • 54bdb98 feat: implement iam role auth for bedrock
  • aec326b fix: make client refreshes properly when switching between iam_user and iam_role
  • 1562316 merge with master
  • 08afca7 checkout agent flow
  • d867483 fix aiprovider for bedrock in agent use

📊 Changes

6 files changed (+147 additions, -108 deletions)

View changed files

📝 frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx (+57 -68)
📝 server/utils/AiProviders/bedrock/index.js (+41 -19)
📝 server/utils/AiProviders/bedrock/utils.js (+2 -2)
📝 server/utils/agents/aibitat/providers/ai-provider.js (+9 -4)
📝 server/utils/agents/aibitat/providers/bedrock.js (+34 -14)
📝 server/utils/helpers/updateENV.js (+4 -1)

📄 Description

Pull Request Type

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

Relevant Issues

resolves https://github.com/Mintplex-Labs/anything-llm/issues/2588

What is in this change?

This feature includes the ability to authenticate with bedrock on aws using your iam role instead of using long term iam credentials. It should be backwards compatible with people who have setup:

AWS_BEDROCK_LLM_ACCESS_KEY_ID=
AWS_BEDROCK_LLM_ACCESS_KEY=

Additional Information

In the UI it looks like this now, default:

SCR-20241114-jaaq

when you enable the iam role:

SCR-20241114-jacj

Please verify it and let me know if you have some feedback, so I can improve it, then I can also update the docs once you're happy with the result.

Developer Validations

  • 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

🔄 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/2632 **Author:** [@dannysteenman](https://github.com/dannysteenman) **Created:** 11/14/2024 **Status:** ✅ Merged **Merged:** 5/6/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`54bdb98`](https://github.com/Mintplex-Labs/anything-llm/commit/54bdb988f98a6af0941537a166245c8347c59054) feat: implement iam role auth for bedrock - [`aec326b`](https://github.com/Mintplex-Labs/anything-llm/commit/aec326bc4777a52cb00d949f8f368581471af28e) fix: make client refreshes properly when switching between iam_user and iam_role - [`1562316`](https://github.com/Mintplex-Labs/anything-llm/commit/15623165a080939cef54a0aa8864a6d46c2e2aff) merge with master - [`08afca7`](https://github.com/Mintplex-Labs/anything-llm/commit/08afca780a96a7207e619d15448f7608b8c80af0) checkout agent flow - [`d867483`](https://github.com/Mintplex-Labs/anything-llm/commit/d867483b63741f6505b5c1ec7be23aa1d5dbe509) fix aiprovider for bedrock in agent use ### 📊 Changes **6 files changed** (+147 additions, -108 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/LLMSelection/AwsBedrockLLMOptions/index.jsx` (+57 -68) 📝 `server/utils/AiProviders/bedrock/index.js` (+41 -19) 📝 `server/utils/AiProviders/bedrock/utils.js` (+2 -2) 📝 `server/utils/agents/aibitat/providers/ai-provider.js` (+9 -4) 📝 `server/utils/agents/aibitat/providers/bedrock.js` (+34 -14) 📝 `server/utils/helpers/updateENV.js` (+4 -1) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves https://github.com/Mintplex-Labs/anything-llm/issues/2588 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> This feature includes the ability to authenticate with bedrock on aws using your iam role instead of using long term iam credentials. It should be backwards compatible with people who have setup: ``` AWS_BEDROCK_LLM_ACCESS_KEY_ID= AWS_BEDROCK_LLM_ACCESS_KEY= ``` ### Additional Information In the UI it looks like this now, default: <img width="933" alt="SCR-20241114-jaaq" src="https://github.com/user-attachments/assets/967398c9-2b62-4f53-9f3b-f357adc9fb0a"> when you enable the iam role: <img width="911" alt="SCR-20241114-jacj" src="https://github.com/user-attachments/assets/c6c6b522-62ad-4852-b38b-9534a03d8a1e"> Please verify it and let me know if you have some feedback, so I can improve it, then I can also update the docs once you're happy with the result. ### 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:02 -05:00
yindo closed this issue 2026-02-22 18:35:02 -05:00
yindo changed title from [PR #2632] feat: support for iam roles for bedrock client to [PR #2632] [MERGED] feat: support for iam roles for bedrock client 2026-06-05 15:16:34 -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#4051