Skip to content

Conversation

@dwin
Copy link

@dwin dwin commented Apr 10, 2025

Fixes #2469

Add logic to refresh AWS credentials when they expire.

  • src/api/providers/bedrock.ts

    • Add logic to refresh AWS credentials using fromIni from @aws-sdk/credential-providers when a request fails due to expired credentials.
    • Update createMessage and completePrompt methods to handle credential refresh.
    • Add a private method refreshCredentials to handle the actual credential refresh process.
  • src/api/providers/tests/bedrock.test.ts

    • Add tests to verify that refreshed credentials are automatically detected and used without requiring a restart.
  • src/api/providers/tests/bedrock-invokedModelId.test.ts

    • Add tests for detecting and using refreshed credentials.
  • src/api/providers/tests/bedrock-custom-arn.test.ts

    • Add tests for detecting and using refreshed credentials.

For more details, open the Copilot Workspace session.

Fixes RooCodeInc#2469

Add logic to refresh AWS credentials when they expire.

* **src/api/providers/bedrock.ts**
  - Add logic to refresh AWS credentials using `fromIni` from `@aws-sdk/credential-providers` when a request fails due to expired credentials.
  - Update `createMessage` and `completePrompt` methods to handle credential refresh.
  - Add a private method `refreshCredentials` to handle the actual credential refresh process.

* **src/api/providers/__tests__/bedrock.test.ts**
  - Add tests to verify that refreshed credentials are automatically detected and used without requiring a restart.

* **src/api/providers/__tests__/bedrock-invokedModelId.test.ts**
  - Add tests for detecting and using refreshed credentials.

* **src/api/providers/__tests__/bedrock-custom-arn.test.ts**
  - Add tests for detecting and using refreshed credentials.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/RooVetGit/Roo-Code/issues/2469?shareId=XXXX-XXXX-XXXX-XXXX).
@changeset-bot
Copy link

changeset-bot bot commented Apr 10, 2025

⚠️ No Changeset found

Latest commit: 7abfeb5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dwin dwin changed the title Fix AWS credentials caching issue fix: AWS credentials caching issue Apr 10, 2025
@mrubens
Copy link
Collaborator

mrubens commented Apr 10, 2025

Thank you for reporting the issue and opening a PR! Let me know when it's ready for review 🙏

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 10, 2025
@mrubens
Copy link
Collaborator

mrubens commented Apr 14, 2025

Did #2530 fix this for you in 3.11.15?

@mrubens
Copy link
Collaborator

mrubens commented Apr 15, 2025

Going to close this for now but let me know if that was premature. Thank you for digging in!

@mrubens mrubens closed this Apr 15, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Apr 15, 2025
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.

AWS Session Credential Caching Issue in Roo Code

2 participants