Is it not possible to use an existing task definit...
# dagster-plus
l
Is it not possible to use an existing task definition with
EcsUserCodeLauncher
? I’m hoping to use Fargate for user code, but couldn’t find related config for
dagster.yaml
.
🤖 1
I’m actually confused because there are similar configs such as
task_role_arn
in
dagster_cloud.xml
too. Which one should be updated (or both?)? Neither seems to support existing task definitions, though.
g
hey Linton, that's correct it's not possible to use
EcsUseCodeLauncher
for that purpose of running the agent and code location outside of ECS. Since its based class is not part of the open source codebase you wouldn't be able to derive your own. Could you please provide more context about what you're aiming to do?
l
I see. thanks. I’m just trying to find the cheapest way to host the agent and user code. 1. Running the agent in an EC2 (t3a.small or smaller) — since this seems much cheaper than via Fargate, and I have another service to host in that instance as well. The expected load is low so I want to keep it small since it’d continuously run. 2. Launch user code in larger, but ephemeral instances (presumably Fargate). This is because the asset processing code requires lots of memory and CPU. I’ve defined the corresponding requirements in a task definition, which I hoped to launch via
EcsUserCodeLauncher
. But in this case, maybe I should move the definitions (CPU/memory allocation, environment vars etc.) to
dagster.yaml
and define the image as a code location in
dagster_cloud.yaml
. Or is this about right?