I set up an ECS agent that I can see running in pr...
# ask-community
j
I set up an ECS agent that I can see running in prefect cloud, but when running a job I can see it is submitted but it will not execute. It is just stuck in the submitted state so not sure if I do not have enough storage of the agent can't get into one of the layers but there are not logs that say anything is wrong
r
Hey John!! Here is a great article about how to trouble shoot your flows being stuck in the submitted state: https://discourse.prefect.io/t/why-is-my-flow-stuck-in-a-submitted-state/201
For the ECS agent, make sure that the
task_execution_role
is set up properly
j
Thank you @Rob Freedy! I made sure all required resources for the
task_execution_role
were set up so I think that should be okay on that. The only thing that comes to mind would be the capacity, but I feel I have enough allocated (cpu 512 and memory 1024)
Would I have to specify the
task_execution_role
in the ECSRun in the actual python script even though the agent already has these permissions?
r
If you provide an ECR image, you will have to provide the execution role in the ECSRun as noted in the execution_role_arn part of this documentation: https://docs-v1.prefect.io/api/latest/run_configs.html#ecsrun