Hey all! I've been following the <ECS Worker Guide...
# prefect-aws
j
Hey all! I've been following the ECS Worker Guide to get our infrastructure setup. Everything seems to be working fine except when I trigger a flow-run, it crashes and I don't get any logging in either the Prefect UI or in the ECS task. A couple things I've noticed: 1. The taskdef generated by the Prefect worker doesn't contain the prefect api url as an env var. Seems like it should: How does the worker pass this info to the flow task? 2. The taskdef generated by the Prefect worker doesn't have any logging setup. 3. The taskdef generated by the Prefect worker doesn't have any
command
to customize how the docker container should be run... How does it know to run the specific flow? 4. When I run the docker image (locally) that is generated by the prefect cli, it doesn't actually run the flow... it just opens a shell prompt. Thanks for helping out a noob!
@Marvin any help here ☝️ ?
m
Could you please provide more details about the specific issue or question you have with Prefect? This will help me understand how best to assist you!
d
Hey Jonathan 👋 , ive been working on moving my setup from an ecs agent to an ecs worker. I assume your work pool worker calls docker images to run your flows. I’ve found that i needed to edit a few things in my worker pool base-job-configuration. 1) I have a unique flow worker task definition for my custom docker image where my flows run. I also pass that task role, execution role, vpcid, network config (for db stuff) and cluster name (for my own EC2 cluster). 2) the walkthrough doesn’t state it, but you can attach log configuration to the task definition for both the pool worker and the flow worker which will allow for UI logging. 3) The docker image that i have in ecr doesnt have an
entrypoint
per say. The pool worker will execute the docker image with
Copy code
prefect flow-run execute <flow-id>
I hope this helps in some way. I’m still on the journey to get things working.