def to_s3_output_ts(dag, *args):
    """ Returns the S3 URL for any output file for the DAG with a timestamp
    """
    components, suffix = args[:-1], args[-1]
    path = '/'.join(components)
    slug = '-'.join(components)

    return (
        '{{ conf.get("core", "reach_s3_prefix") }}'
        '/output/%s/%s/{{ ts_nodash }}-%s%s'
    ) % (dag.dag_id, path, slug, suffix)