Hi everyone — on one of the first tasks in a flow ...
# ask-community
b
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..
k
Hey @Bruno Murino, I don’t think there is a way to do this. Are you using DaskExecutor or LocalDaskExecutor?
b
I’m using an ECS agent, so the tasks run as ECS tasks
k
Yeah the general answer is no unfortunately because the connection has to be with the Task when it is mapped out to multiple workers.