https://prefect.io logo
b

brodul

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

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)
c

Christopher Boyd

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

https://www.youtube.com/watch?v=q-sl6bzi5fw&pp=ygULcHJlZmVjdCBlY3M%3D

I know there are also some recipes in our github, but specifically as it relates to the task_definition_arn, I’m not sure. https://github.com/PrefectHQ/prefect-recipes
d

Dominic Tarro

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

brodul

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
d

Dominic Tarro

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