function resolveEndpointDiscoveryConfig(request) {
	  var service = request.service || {};
	  if (service.config.endpointDiscoveryEnabled !== undefined) {
	    return service.config.endpointDiscoveryEnabled;
	  }

	  //shared ini file is only available in Node
	  //not to check env in browser
	  if (util.isBrowser()) return undefined;

	  // If any of recognized endpoint discovery config env is set
	  for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) {
	    var env = endpointDiscoveryEnabledEnvs[i];
	    if (Object.prototype.hasOwnProperty.call(process.env, env)) {
	      if (process.env[env] === '' || process.env[env] === undefined) {
	        throw util.error(new Error(), {
	          code: 'ConfigurationException',
	          message: 'environmental variable ' + env + ' cannot be set to nothing'
	        });
	      }
	      return !isFalsy(process.env[env]);
	    }
	  }

	  var configFile = {};
	  try {
	    configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({
	      isConfig: true,
	      filename: process.env[AWS.util.sharedConfigFileEnv]
	    }) : {};
	  } catch (e) {}
	  var sharedFileConfig = configFile[
	    process.env.AWS_PROFILE || AWS.util.defaultProfile
	  ] || {};
	  if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) {
	    if (sharedFileConfig.endpoint_discovery_enabled === undefined) {
	      throw util.error(new Error(), {
	        code: 'ConfigurationException',
	        message: 'config file entry \'endpoint_discovery_enabled\' cannot be set to nothing'
	      });
	    }
	    return !isFalsy(sharedFileConfig.endpoint_discovery_enabled);
	  }
	  return undefined;
	}
If endpoint discovery should perform for this request when no operation requires endpoint
discovery for the given service.
SDK performs config resolution in order like below:
1. If set in client configuration.
2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY.
3. If set in shared ini config file with key 'endpoint_discovery_enabled'.
@param [object] request request object.
@returns [boolean|undefined] if endpoint discovery config is not set in any source, this
 function returns undefined
@api private