def remove_user_from_group(group_name, user_name, region=None, key=None, keyid=None, profile=None):
 user = get_user(user_name, region, key, keyid, profile)
 if (not user):
  msg = 'Username : {0} does not exist.'
  log.error(msg.format(user_name, group_name))
  return False
 if (not user_exists_in_group(user_name, group_name, region=region, key=key, keyid=keyid, profile=profile)):
  return True
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 try:
  info = conn.remove_user_from_group(group_name, user_name)
  if (not info):
   return False
  return info
 except boto.exception.BotoServerError as e:
  log.debug(e)
  msg = 'Failed to remove user {0} from group {1}.'
  log.error(msg.format(user_name, group_name))
  return False

def remove_user_from_group ( group_name , user_name , region = None , key = None , keyid = None , profile = None ) : user = get_user ( user_name , region , key , keyid , profile ) if ( not user ) : msg = 'Username : {0} does not exist.' log . error ( msg . format ( user_name , group_name ) ) return False if ( not user_exists_in_group ( user_name , group_name , region = region , key = key , keyid = keyid , profile = profile ) ) : return True conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) try : info = conn . remove_user_from_group ( group_name , user_name ) if ( not info ) : return False return info except boto . exception . BotoServerError as e : log . debug ( e ) msg = 'Failed to remove user {0} from group {1}.' log . error ( msg . format ( user_name , group_name ) ) return False
remove user from group .