def get_instances_output(instances):
    """
    @type instances: list
    """
    ret = ''
    for instance in instances:
        ret += '{0}\n'.format(instance.get('InstanceId'))
    if ret:
        return ret.rstrip()
