def get_instance_id_to_name_map(instance_info):
    """generate instance_id to instance_name map.  If an instance has no name it will have value 'unknown'."""
    instance_id_to_name = {}
    for instance_id in instance_info:
        instance = instance_info[instance_id]
        instance_name = 'unnamed'
        if 'Tags' in instance:
            for tag in instance['Tags']:
                if tag['Key'] == 'Name':
                    instance_name = tag['Value']
        instance_id_to_name[instance['InstanceId']] = instance_name
    return instance_id_to_name
