def get_node_host(name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 if (not conn):
  return None
 try:
  cc = conn.describe_cache_clusters(name, show_cache_node_info=True)
 except boto.exception.BotoServerError as e:
  msg = 'Failed to get config for cache cluster {0}.'.format(name)
  log.error(msg)
  log.debug(e)
  return {}
 cc = cc['DescribeCacheClustersResponse']['DescribeCacheClustersResult']
 host = cc['CacheClusters'][0]['CacheNodes'][0]['Endpoint']['Address']
 return host

def get_node_host ( name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if ( not conn ) : return None try : cc = conn . describe_cache_clusters ( name , show_cache_node_info = True ) except boto . exception . BotoServerError as e : msg = 'Failed to get config for cache cluster {0}.' . format ( name ) log . error ( msg ) log . debug ( e ) return { } cc = cc [ 'DescribeCacheClustersResponse' ] [ 'DescribeCacheClustersResult' ] host = cc [ 'CacheClusters' ] [ 0 ] [ 'CacheNodes' ] [ 0 ] [ 'Endpoint' ] [ 'Address' ] return host
get hostname from cache node cli example:: salt myminion boto_elasticache .