06/30/2023, 2:48 PM
I am trying to use ECSTask infra block with predefined
are there any examples for that?
I have defined a Task definition myself, but Prefect is making new revisions

Mariano Pennini

06/30/2023, 2:53 PM
Uncanny, I was typing out a very similar question, but for Work Pools. I think the recommendation is to move from ECSTask to ECSWorker for new projects.
However, I would also like to see an example of the "pre-existing task definition" capability (I'm running into permissioning issues when my worker tries to spin up my task)

Christopher Boyd

06/30/2023, 6:32 PM
Unfortunately ECS is not my forte, but Taylor has some a video up here -

I know there are also some recipes in our github, but specifically as it relates to the task_definition_arn, I’m not sure.

Dominic Tarro

06/30/2023, 8:05 PM
This message contains interactive elements.


07/03/2023, 8:10 AM
Thanks for that. I know one can set an arn, but prefect still creates new revisions of the task definition. I will open an issue in GH with exact details
It's also quite hard to construct the correct ECSTask initialization with an ARN. As prefect then compares the 2 and creates a new one, if they don't match. So it's a puzzle one needs to solve by looking at the
prefect-aws code

Dominic Tarro

07/03/2023, 4:37 PM
Why would they not match? Are you defining part of the task in Prefect?