Hey guys!
I have a Prefect Agent running as an ECS Service. It is uses a lightweight container and will be invoking deployments via
ECSTask
.
My question: Do I need to install dependencies like
prefect-aws
,
s3fs
etc. and register the blocks (eg:
prefect block register -m prefect_aws.ecs
) in the container for the agent? Or can I just use the latest
prefecthq/prefect
image?
👍 1
✅ 1
Kelvin DeCosta
10/20/2022, 4:43 PM
I'm currently using this Dockerfile:
Copy code
FROM prefecthq/prefect:2-python3.10
# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache-dir
# Register AWS block types
RUN prefect block register -m prefect_aws.ecs
But I think this might be unused / redundant
a
Anna Geller
10/20/2022, 4:43 PM
Your intuition is right, you can use the latest
prefecthq/prefect
image for your agent
✅ 1
Anna Geller
10/20/2022, 4:45 PM
the ECSTask block has all attributes needed, agent can be super lightweight and only needs prefect as a dependency
we have this repo template with a blog post and video tutorial linked in the readme https://github.com/anna-geller/dataflow-ops
k
Kelvin DeCosta
10/20/2022, 4:47 PM
Thank you!
And yes, this repo has been instrumental to our approach!
I just ran my first prefect deployment as an ECS Task yesterday!
Now, I'm setting up some workflows to keep things updated
🙏 2
👍 3
a
Anna Geller
10/20/2022, 4:52 PM
awesome, so great to hear and keep us posted how it goes! 🙌
k
Kelvin DeCosta
10/25/2022, 5:26 PM
Hey
Just wanted to update that you do infact need to install
prefect-aws
if you plan to use
ECSTask
.
I ran into a
KeyError: ecs-task
could not be dispatched
Also, I recently switched from
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.