func GetDefaultEndPoint(region string, service string) string {
	log := ssmlog.SSMLogger(true)
	endpoint := ""

	if val, ok := awsRegionServiceDomainMap[region]; ok {
		endpoint = val
	} else {
		dynamicServiceDomain, err := dynamicData.ServiceDomain()
		if dynamicServiceDomain != "" {
			endpoint = dynamicServiceDomain
			log.Infof("Service Endpoint found from metadata service: %v", endpoint)
		} else {
			log.Warnf("Error when getting Service Domain dynamically: %v", err)
			if strings.HasPrefix(region, "cn-") {
				endpoint = "amazonaws.com.cn"
			}
		}
	}

	if endpoint == "" || endpoint == "amazonaws.com" {
		return ""
	} else {
		return getServiceEndpoint(region, service, endpoint)
	}
}
// getDefaultEndPoint returns the default endpoint for a service, it should be empty unless it's a china region
getDefaultEndPoint returns the default endpoint for a service, it should be empty unless it's a china region
// getDefaultEndPoint returns the default endpoint for a service it should be empty unless it ' s a china region
func GetDefaultEndPoint(region string, service string) string {
	log := ssmlog.SSMLogger(true)
	endpoint := ""
	if val, ok := awsRegionServiceDomainMap[region]; ok {
		endpoint = val
	} else {
		dynamicServiceDomain, err := dynamicData.ServiceDomain()
		if dynamicServiceDomain != "" {
			endpoint = dynamicServiceDomain
			log.Infof("Service Endpoint found from metadata service: %v", endpoint)
		} else {
			log.Warnf("Error when getting Service Domain dynamically: %v", err)
			if strings.HasPrefix(region, "cn-") {
				endpoint = "amazonaws.com.cn"
			}
		}
	}
	if endpoint == "" || endpoint == "amazonaws.com" {
		return ""
	} else {
		return getServiceEndpoint(region, service, endpoint)
	}
}
func GetDefaultEndPoint ( region string , service string ) string { log := ssmlog . SSMLogger ( true ) endpoint := " " if val , ok := awsRegionServiceDomainMap [ region ] ; ok { endpoint = val } else { dynamicServiceDomain , err := dynamicData . ServiceDomain ( ) if dynamicServiceDomain != " " { endpoint = dynamicServiceDomain log . Infof ( " " , endpoint ) } else { log . Warnf ( " " , err ) if strings . HasPrefix ( region , " " ) { endpoint = " " } } } if endpoint == " " || endpoint == " " { return " " } else { return getServiceEndpoint ( region , service , endpoint ) } }
getDefaultEndPoint returns the default endpoint for a service, it should be empty unless it's a china region
getDefaultEndPoint returns the default endpoint for a service it should be empty unless it ' s a china region