def _check_for_iam_endpoint(self, region, iam_endpoint): try: self._session.create_client('emr', region) except botocore.exceptions.UnknownEndpointError: if iam_endpoint is None: raise exceptions.UnknownIamEndpointError(region=region)
def _check_for_iam_endpoint(self, region, iam_endpoint): try: self._session.get_service('emr').get_endpoint(region) except botocore.exceptions.UnknownEndpointError: if iam_endpoint is None: raise exceptions.UnknownIamEndpointError(region=region)