We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb4fb8f commit eb10682Copy full SHA for eb10682
1 file changed
pydataapi/pydataapi.py
@@ -462,8 +462,13 @@ def __init__(
462
self.secret_arn: str = secret_arn
463
self.database: Optional[str] = database
464
465
+ client_kwargs = {}
466
+ region_name = resource_arn.split(':')[3]
467
+ if region_name:
468
+ client_kwargs['region_name'] = region_name
469
+
470
self._transaction_id: Optional[str] = transaction_id
- self._client: boto3.session.Session.client = client or boto3.client('rds-data')
471
+ self._client: boto3.session.Session.client = client or boto3.client('rds-data', **client_kwargs)
472
self._transaction_status: Optional[str] = None
473
self.rollback_exception: Optional[Type[Exception]] = rollback_exception
474
0 commit comments