Hi. I have a flow that I have successfully regist...
# prefect-community
s
Hi. I have a flow that I have successfully registered. When I do a quick run, nothing happens. What might I be missing? I followed this tutorial with my own logic. My run_config..
Copy code
RUN_CONFIG = ECSRun(labels=['s3-flow-storage'],
                    task_role_arn=TASK_ARN,
                    execution_role_arn=EXECUTION_ARN,
                    image='<http://1111111.dkr.ecr.us-east-1.amazonaws.com/prefectdemo:latest|1111111.dkr.ecr.us-east-1.amazonaws.com/prefectdemo:latest>',
                    memory=512, cpu=256)
a
When you say nothing happens, I assume your flow run is stuck in a Scheduled state, correct? If so, check out this Discourse topic to see how you can fix that. This article is shouting at you to use an updated version of the ECS tutorial 🙂 Can you try following that one?
h
@Anna GellerI found this part of your piece quite interesting and assuring.. 💪
We could write a script-bash which periodically kill the process, register and start the agent again?
a
probably, but in this updated blog post you can see an example how you can run your ECS agent as ECS service which is much more robust and this is the recommended approach for running ECS agent in production. This way, AWS ECS can ensure that your agent is running reliably at all times and if something should go wrong, the ECS service would restart the container automatically with no nasty hacks or workarounds 🙂
if you have any questions about it, I'm happy to assist, but I would strongly recommend running ECS agent as ECS service rather than on EC2 to the point that I'm wondering whether I should remove this old blog post 😅 or at least rewrite it running the ECS agent as ECS service
s
Thanks everyone. It did turn out to be the prefect agent. It was running in the background and I assumed that the machine had not restarted. However, something had killed the agent process.
This article is shouting at you to use an updated version of the ECS tutorial 🙂 Can you try following that one?
That’s what I get for skipping to the good stuff. Didn’t notice the UPDATE message
😆 1
marvin 1
a
Gotcha, yeah running it as a service makes things much easier, more robust and actually even cheaper because running one container incurs less costs than running an entire EC2 instance (even a tiny one)