Bruno Murino

    Bruno Murino

    1 year ago
    Hi everyone — on one of the first tasks in a flow I create an aws session object that is then passed as argument to many subsequent tasks. Is there any way to set this aws session globally for all tasks, so that I don’t have to explicitly pass it? I tried adding it to prefect.context but that doesn’t work..
    Kevin Kho

    Kevin Kho

    1 year ago
    Hey @Bruno Murino, I don’t think there is a way to do this. Are you using DaskExecutor or LocalDaskExecutor?
    Bruno Murino

    Bruno Murino

    1 year ago
    I’m using an ECS agent, so the tasks run as ECS tasks
    Kevin Kho

    Kevin Kho

    1 year ago
    Yeah the general answer is no unfortunately because the connection has to be with the Task when it is mapped out to multiple workers.