Just woke up to find all our ECS Worker tasks fail...
# ask-community
a
Just woke up to find all our ECS Worker tasks failing as the
task_definition_arn
we have set as override in the deployments aren't being respected anymore. Turns out the default
command
we have used from the prefect-aws guide
pip install prefect-aws && prefect worker start
has started to install
prefect-aws==0.5.0
which is now installing Prefect 3 and that's not respecting
task_definition_arn
value and generates its own task definition. To start with there is the incompatibility in Prefect 2 in the server and Prefect 3 in the ECS Worker and ignoring the task_arn seems to be an undocumented regression. The solution is to change the worker command in its task definition to:
pip install prefect-aws==0.4.19 && prefect worker start
n
hi @Arun yes! the default installs for both
prefect
and its integrations are prefect 3.x versions now if you simply install extras like
prefect[aws]<3
you will always get the right version of the package i would also recommend not installing deps at runtime and building static images up front
🙌 1
a
The ECS worker doesn't do anything other than to schedule ECS tasks, so, we were just following the prefrect-aws docs and installing it in runtime. We still are 😛
d
@Arun Can you share your base job template that respects
task_definition_arn
and runs flows successfully? I can get the worker (w/
prefect-aws==0.4.19
installed) to start ECS tasks using the provided
task_definition_arn
, but it doesn't supply a
command
to
ecs:StartTask
, which I gather needs to be
python -m prefect.engine [task-run-id]
.