Skip to content

Conversation

santoshameti
Copy link

Updated aws provider to use credentials from provider config when available. Updated the client documentation as well to reflect the names of the config inline with aws documentation.

I have run pre-commit on the changes. Tests are running except a small subset that need api key set.

Issue #221

available. Updated the client documentation as well to reflect the names
of the config inline with aws documentation.

I have run pre-commit on the changes. Tests are running except a small
subset that need api key set.
@mauro13983
Copy link

mauro13983 commented Jun 30, 2025

Please do not use boto3.client()
Instead use:

session = boto3.Session(
    aws_access_key_id=self.aws_access_key_id,
    aws_secret_access_key=self.aws_secret_access_key,
)
return session.client(
    "bedrock-runtime", 
    region_name=self.region_name,
)

boto3.client() internally creates a singleton Session objcet, that is created only once (problematic for web applications).
I've created a pull request with the correct implementation:
#233

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.

2 participants