https://dagster.io/ logo
#ask-ai
Title
# ask-ai
l

Linton Ye

03/06/2024, 6:47 AM
If I’m using
EcsUserCodeLauncher
to launch user code containers via Fargate, will the containers be automatically stopped when the run completes or fails?
s

Scout

03/06/2024, 6:47 AM
The documentation does not explicitly mention an
EcsUserCodeLauncher
, but it does provide information about the
EcsRunLauncher
. Assuming you are referring to the
EcsRunLauncher
, which is used to launch runs on AWS ECS (Elastic Container Service), the behavior after a run completes or fails is typically managed by the ECS task definitions and the run launcher configuration. When a run is executed using the
EcsRunLauncher
, it will launch an ECS task. Once the run is completed or fails, the ECS task that was running the Dagster run should stop, as the lifecycle of the task is tied to the execution of the run. This is the standard behavior for tasks in ECS: they stop once the process they are running has completed. However, if you are experiencing issues where tasks do not stop as expected, you may need to look into the configuration of your ECS service and task definitions to ensure they are set up correctly. Additionally, you can configure health checks and timeouts to handle cases where tasks may hang or fail to stop as expected. For example, the documentation mentions that you can configure
start_timeout_seconds
, and any runs that are stuck in
STARTING
will be terminated, regardless of the run launcher that you're using. This feature is useful for handling cases where a task may not start properly and is left hanging. If you are looking for more specific behavior or encountering issues with the
EcsRunLauncher
, please refer to the documentation for the most up-to-date and detailed information on configuration options and expected behavior. If the documentation does not provide a clear answer, you may need to explore additional troubleshooting steps or seek support from the Dagster community or maintainers.
4 Views