I am trying to use ECSTask infra block with predef...
# ask-community
b
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
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
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
This message contains interactive elements.
b
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
Why would they not match? Are you defining part of the task in Prefect?