@@ -44,7 +44,8 @@ def _check_bedrock_dependencies() -> None:
4444_check_bedrock_dependencies ()
4545
4646import boto3
47- import botocore .config
47+ from botocore import UNSIGNED
48+ from botocore .config import Config
4849from langchain_aws import (
4950 ChatBedrock ,
5051 ChatBedrockConverse ,
@@ -97,10 +98,11 @@ def get_client(self):
9798 region_name = "none" ,
9899 aws_access_key_id = "none" ,
99100 aws_secret_access_key = "none" ,
100- config = botocore .config .Config (
101+ config = Config (
102+ signature_version = UNSIGNED ,
101103 retries = {
102104 "total_max_attempts" : 1 ,
103- }
105+ },
104106 ),
105107 )
106108 client .meta .events .register (
@@ -183,6 +185,7 @@ def __init__(
183185 client = passthrough_client .get_client ()
184186 kwargs ["client" ] = client
185187 kwargs ["model" ] = model_name
188+ kwargs .setdefault ("region_name" , "none" )
186189 super ().__init__ (** kwargs )
187190 self .model = model_name
188191 self .retryer = retryer
@@ -244,6 +247,7 @@ def __init__(
244247 client = passthrough_client .get_client ()
245248 kwargs ["client" ] = client
246249 kwargs ["model" ] = model_name
250+ kwargs .setdefault ("region_name" , "none" )
247251 super ().__init__ (** kwargs )
248252 self .model = model_name
249253 self .retryer = retryer
0 commit comments