-
Hello folks. 👋 I'm trying to move from DefaultRunLauncher to EcsRunLauncher. Deamon, Ui, grpc's are running on ECS. I added a env var to indicate each grpc server which task definition to use and not use the deamon task def: Even tough we are working with a vpc, my task definitions have no network mode indicated and are all set to default. According to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/run_task.html|aws doc, the networkconfiguration should be provided only for task definition with network mode: "awsvpc". Thanks for your help, cheers! The question was originally asked in Dagster Slack. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
The EcsRunLauncher will pull certain fields to pass into the boto3 run_task call using the ECS task that is launching the run. You can see how it sets the default networkConfiguration values here: https://github.com/dagster-io/dagster/blob/master/python_modules/libraries/dagster-aws/dagster_aws/ecs/tasks.py#L386-L392 It seems like that default networkConfiguration is incompatible with your task definition. You can set the "run_task_kwargs" key on your run launcher in your dagster.yaml to override the networkConfiguration value to something different, following the example here: https://docs.dagster.io/deployment/guides/aws#customizing-the-launched-runs-task |
Beta Was this translation helpful? Give feedback.
-
Thanks @gibsondan I managed to make it work by upgrading service and task definition network mode to awsvpc. The task is correctly launched but I don't get any feedback from the task and dagster stays at "Starting" status. I'll check logs and figure it out. It might be a network issue. Thanks for your help, cheers |
Beta Was this translation helpful? Give feedback.
-
@gibsondan so maybe unrelated but I'm looking for a way to define a different task definition from that of the user code definition and the main daemon/webserver, which I'm inferring from above i can just set the env. var. |
Beta Was this translation helpful? Give feedback.
The EcsRunLauncher will pull certain fields to pass into the boto3 run_task call using the ECS task that is launching the run. You can see how it sets the default networkConfiguration values here: https://github.com/dagster-io/dagster/blob/master/python_modules/libraries/dagster-aws/dagster_aws/ecs/tasks.py#L386-L392
It seems like that default networkConfiguration is incompatible with your task definition. You can set the "run_task_kwargs" key on your run launcher in your dagster.yaml to override the networkConfiguration value to something different, following the example here: https://docs.dagster.io/deployment/guides/aws#customizing-the-launched-runs-task