Hi all! I note another deprecation, this time of `...
# ask-community
s
Hi all! I note another deprecation, this time of
ECSTask
. We're using it such that a flow (running locally) can spin up numerous ECS tasks that retrain our ML models. The images that are spun up have no knowledge of prefect, flows, tasks, etc, they just do their job and then close. What would be the right way to migrate this to the new methodology? I worry that using an ECS worker might not be what we want - after all, its not the flow itself that needs to be spun up in cloud infra, its tasks within the flow itself
n
hey @Samuel Hinton - good question! just to make sure I understand, you're doing something roughly like this?
Copy code
@flow
def foo():
  for container_spec in containers:
    ECSTask(**container_spec).run(...)
s
Yeah, almost exactly like that! Sorry for the delayed response @Nate - have been on parental leave 🙂
p
@Nate Hi! this could be a nice feature, we’re doing exactly the same using ECSTask inside a flow
up
n
thanks @Paula Lasalas! would you be willing to create an issue to codify this feature request? even though these infra blocks were primarily used for 2.x style deployments, I can see how there'd be value in having an analogue for cases where you simply want to conveniently programmatically invoke work like this on our supported remote runtimes
p
thanks @Nate! sure, I’m going to create an issue. As I understand, if we keep using the docker image prefecthq/prefect:2-python3.10 and python library
prefect-aws==0.4.6
for example, we’ll be able to use ECSTask after deprecation on September, right?
n
thank you! catjam yes if you pin prefect / any integration libraries like prefect-aws, you can still use them against cloud /oss server
blob attention gif 1