amazon-web-servicesairflowmwaa

MWAA CLI - Stop Dags Execution


I'm using AWS MWAA 2.6.3 and I'm trying to mark an execution of dag as Failed using run_id, is there anyway to do that using boto3 MWAA, since we can't use the backend APIs;

thanks!


Solution

  • Neither the MWAA CLI nor the standard Airflow CLI offers direct support for stopping a DAG programmatically. The only method available to achieve this is through the Airflow UI, specifically by marking an Airflow task as failed.


    Update

    There is a more unconventional approach to programmatically mark the execution of a DAG as failed, which involves using automation tools. One possible method is by employing Puppeteer, a Node library which provides a high-level API to control Chromium over the DevTools Protocol. Puppeteer can be run in an AWS Lambda function to mimic the actions taken in the Airflow UI.