Merge pull request #1644 from TorgemanTarak/pass-region-name-to-the-client

pass the reigion name to the boto3.session.client to use region gated…
This commit is contained in:
shenchucheng 2024-12-18 10:20:32 +08:00 committed by GitHub
commit 4954729e75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ class BedrockLLM(BaseLLM):
"region_name": os.environ.get("AWS_DEFAULT_REGION", self.config.region_name),
}
session = boto3.Session(**self.__credential_kwargs)
client = session.client(service_name)
client = session.client(service_name, region_name=self.__credential_kwargs["region_name"])
return client
@property