ale
11/02/2021, 5:27 PMCannot provide `task_definition_arn` when using `Docker` storage
Looking at the code at https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/ecs/agent.py it seems a by design choice.
What are the alternatives for running a flow on ECS while providing the task definition ARN?Anna Geller
ale
11/02/2021, 5:37 PMstorage = Docker(
image_name="foo",
image_tag="bar"
)
config = ECSRun(labels=["my_label"], task_definition_arn="<my_task_arn>")
ale
11/02/2021, 5:38 PM# f is the flow object
f.run_config = config
ale
11/02/2021, 5:39 PMKevin Kho
ale
11/02/2021, 5:45 PMale
11/02/2021, 5:46 PMale
11/02/2021, 5:51 PMKevin Kho
task_definition
in your Flow or task_definition_path
.ale
11/02/2021, 5:54 PMKevin Kho
Kevin Kho
storage = Docker(...)
storage.add_flow(flow)
storage.build()
But do not do:
flow.storage = storage
So that the Flow does not use Docker storage.
But at the same time, you would need to use Local Storage to point to the path inside the Docker container where your Flow exists to that ECS can find it and run it. Does that make sense?Kevin Kho
task_definition
and then just provide the task_definition_arn
Kevin Kho
ale
11/02/2021, 5:59 PM