There isn't a robust pattern for this yet as it's a bit tricky once you're in a distributed setting. There's a bit of WIP that's out of date now (
https://github.com/PrefectHQ/prefect/pull/3139) to create a util for this, but for now you're stuck creating the connection in each task. The definition for it can be stored in a global variable but it'll need to be instantiated in each task.