Skip to content

Conversation

stainless-app[bot]
Copy link
Contributor

@stainless-app stainless-app bot commented Mar 28, 2025

Instead of only relying on the client param or AWS_REGION env variable, we can also read this in from the existing AWS config (just like we do already for other Session tokens). This adds support for pulling in the region from the standard AWS config (using boto3).

Resolves both of these issues:

@stainless-app stainless-app bot requested a review from a team as a code owner March 28, 2025 18:17
Copy link
Collaborator

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the commit message here should be fix(bedrock): ... or feat(bedrock): ...

try:
import boto3

session = boto3.Session()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also create a session in _auth.py so ideally we'd reuse it as they can be expensive

@stainless-app stainless-app bot changed the title chore(internal): automatically infer AWS Region in Bedrock client feat(bedrock): automatically infer AWS Region in Bedrock clients Apr 1, 2025
@RobertCraigie
Copy link
Collaborator

tests seem to be failing which is pretty suspicious, changes here seem reasonable though. I suspect we're missing something but it is not clear to me what...

@karpetrosyan
Copy link
Contributor

moved to #974

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.

3 participants