Use min max value from a CTE to define interval range on a next CTE
Range returns exactly 1 row, so you can use a cartesian product (cross join):

, series AS (
    SELECT (row_number() over (ORDER BY 1)) + (range.min_id - 1) AS id, 
    FROM logs
    CROSS JOIN range
    WHERE active_connections.id BETWEEN range.min_id
                                    AND range.max_id
)


I'm not familiar with redshift so if cross join is not supported you can use a join where the join predicate always evaluates to true:

    FROM logs
    JOIN range ON 1=1
    WHERE active_connections.id BETWEEN range.min_id
                                    AND range.max_id


or an old style "," join;

    FROM logs, range
    WHERE active_connections.id BETWEEN range.min_id
                                    AND range.max_id


You can also use a normal join and use the where predicate in the on clause:

    FROM logs
    JOIN range 
        ON active_connections.id BETWEEN range.min_id
                                     AND range.max_id