e

    elegant-smartphone-60282

    1 month ago
    Hey i have this code
    public_subnets = dis_stack.get_output("public_subnets")
    
    subnets_list = public_subnets.apply(lambda id: id)
    but it returns an output object, how can i do that i get a list ?
    s

    stocky-restaurant-98004

    1 month ago
    Try applying on
    id
    . If
    public_subnets
    is not an output, then you'll want to do something like (and pardon my Python)
    plain_old_list_of_strings = public_subnets.map(lambda id: id.apply(lambda x: x))
    l

    little-cartoon-10569

    1 month ago
    Does this work in Python? In general, if something is an output at a particular depth of code, you shouldn't be able to get the thing inside the output at that level of code, ever. You need to access the thing (id, list, whatever) inside an apply, or equivalent.
    Outputs are promises of a future value. By definition, the value isn't known at the time the code runs. You can't turn an output into a non-output.