in aws_jupyter_proxy/awsproxy.py [0:0]
def _get_downstream_signing_region(self) -> str:
"""
Get the region to sign the downstream request for. The default is the region that the request was originally
signed, but if the service has a credentialScope override specified in the service config then that is used.
:return: the region to sign the request with.
"""
if not self.service_info.credential_scope:
return self.upstream_auth_info.region
try:
return self.service_info.credential_scope["region"]
except KeyError:
return self.upstream_auth_info.region