def get_group_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_replication_groups(name)
 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['DescribeReplicationGroupsResponse']['DescribeReplicationGroupsResult']
 cc = cc['ReplicationGroups'][0]['NodeGroups'][0]['PrimaryEndpoint']
 host = cc['Address']
 return host

def get_group_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_replication_groups ( name ) 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 [ 'DescribeReplicationGroupsResponse' ] [ 'DescribeReplicationGroupsResult' ] cc = cc [ 'ReplicationGroups' ] [ 0 ] [ 'NodeGroups' ] [ 0 ] [ 'PrimaryEndpoint' ] host = cc [ 'Address' ] return host
get hostname from replication cache group cli example:: salt myminion boto_elasticache .