-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve support for temporary IAM credentials in chat_bedrock().
Many AWS IAM credentials expire, but previously we ignored this by looking up credentials only once, in `chat_bedrock()`. This commit introduces a caching layer that handles expiry and moves credential retrievable closer to request time, instead. The design is almost identical to httr2's OAuth token caching mechanism, but I had to re-implement various pieces because not all of that API is exported. (We could probably introduce a `req_aws_credentials()` function to `httr2` itself that would handle this, but that might tie us too closely to the semantics of `paws.common`.) Unit tests are included. Closes #261. Signed-off-by: Aaron Jacobs <[email protected]>
- Loading branch information
Showing
3 changed files
with
88 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters