https://prefect.io logo
Title
p

Pedro Machado

05/17/2023, 6:54 PM
Hi again. I am trying to understand how to use projects to run flows on ECS. Could someone explain which recipe I should use, assuming I want to store code in GitHub? Also, could you direct me to some yaml examples? Thanks!
1
j

Jamie Zieziula

05/17/2023, 7:42 PM
Hi @Pedro Machado - you can checkout this recipe which should help you get started with deploying a worker onto ECS
assuming you’ll be want to build a docker iamge, i would recommend running
prefect project init --recipe docker-git
this will setup up a good skeleton prefect.yaml file for you
p

Pedro Machado

05/17/2023, 8:10 PM
Hi Jamie. Thanks for your help! I thought I needed to do more configuration for it to run on ECS. I got a simple flow to run but am having this issue with the worker. Any ideas?
j

Jamie Zieziula

05/17/2023, 8:20 PM
Hm interesting.. taking a look at the logs i see this error
| 1684294205590 | Work pool 'ecs-pool' does not exist and no worker type was provided. Starting a                                                                                                                                                                                                                                                                                  |
| 1684294205590 | process worker...
can you confirm you have a work pool defined with an ECS worker?
p

Pedro Machado

05/17/2023, 8:21 PM
Yes, it got created by terraform. It works but the worker is crashing.
j

Jamie Zieziula

05/17/2023, 8:58 PM
the ecs-pool is of type
process
when it should be of type
amazon elastic container service
(btw i dont think terraform created that work pool for you, it looks like the first run of your flow created it!)
p

Pedro Machado

05/17/2023, 9:10 PM
I see. I re-created the pool using ecs as the type. Let's see if it fails. Thanks for your help!
j

Jamie Zieziula

05/17/2023, 9:11 PM
np!
p

Pedro Machado

05/19/2023, 3:08 AM
Hi Jamie. The worker is still crashing with
RuntimeError: Service exceeded error threshold.
I am getting the same issue when I run a local
process
worker. Could this be a bug?
j

Jamie Zieziula

05/19/2023, 3:07 PM
Looks like Andrew & Jeff sent you a response - let me know if you’re still running into issues
p

Pedro Machado

05/19/2023, 4:44 PM
Thanks, Jamie. It seems to be resolved.