diff --git a/botocore/args.py b/botocore/args.py index 08dec16025..1af656d7ea 100644 --- a/botocore/args.py +++ b/botocore/args.py @@ -267,9 +267,11 @@ def compute_client_args( } def _compute_configured_endpoint_url(self, client_config, endpoint_url): - if endpoint_url is not None or self._ignore_configured_endpoint_urls( - client_config - ): + if self._ignore_configured_endpoint_urls(client_config): + logger.debug("Ignoring configured endpoint URLs.") + return endpoint_url + + if endpoint_url is not None: return endpoint_url return self._config_store.get_config_variable('endpoint_url')