Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

airflow.providers.amazon.aws.triggers.mwaa

Classes

MwaaDagRunCompletedTrigger

Trigger when an MWAA Dag Run is complete.

MwaaTaskCompletedTrigger

Trigger when an MWAA Task is complete.

Module Contents

class airflow.providers.amazon.aws.triggers.mwaa.MwaaDagRunCompletedTrigger(*args, external_env_name, external_dag_id, external_dag_run_id, success_states=None, failure_states=None, waiter_delay=60, waiter_max_attempts=720, **kwargs)[source]

Bases: airflow.providers.amazon.aws.triggers.base.AwsBaseWaiterTrigger

Trigger when an MWAA Dag Run is complete.

Parameters:
  • external_env_name (str) – The external MWAA environment name that contains the DAG Run you want to wait for (templated)

  • external_dag_id (str) – The DAG ID in the external MWAA environment that contains the DAG Run you want to wait for (templated)

  • external_dag_run_id (str) – The DAG Run ID in the external MWAA environment that you want to wait for (templated)

  • success_states (collections.abc.Collection[str] | None) – Collection of DAG Run states that would make this task marked as successful, default is {airflow.utils.state.DagRunState.SUCCESS} (templated)

  • failure_states (collections.abc.Collection[str] | None) – Collection of DAG Run states that would make this task marked as failed and raise an AirflowException, default is {airflow.utils.state.DagRunState.FAILED} (templated)

  • waiter_delay (int) – The amount of time in seconds to wait between attempts. (default: 60)

  • waiter_max_attempts (int) – The maximum number of attempts to be made. (default: 720)

  • aws_conn_id – The Airflow connection used for AWS credentials.

success_states[source]
failure_states[source]
hook()[source]

Override in subclasses to return the right hook.

class airflow.providers.amazon.aws.triggers.mwaa.MwaaTaskCompletedTrigger(*args, external_env_name, external_dag_id, external_dag_run_id=None, external_task_id, success_states=None, failure_states=None, waiter_delay=60, waiter_max_attempts=720, **kwargs)[source]

Bases: airflow.providers.amazon.aws.triggers.base.AwsBaseWaiterTrigger

Trigger when an MWAA Task is complete.

Parameters:
  • external_env_name (str) – The external MWAA environment name that contains the Task Instance you want to wait for (templated)

  • external_dag_id (str) – The DAG ID in the external MWAA environment that contains the Task Instance you want to wait for (templated)

  • external_dag_run_id (str | None) – The DAG Run ID in the external MWAA environment that you want to wait for (templated). If not provided, the latest DAG run is used by default.

  • external_task_id (str) – The Task ID in the external MWAA environment that you want to wait for (templated)

  • success_states (collections.abc.Collection[str] | None) – Collection of task instance states that would make this task marked as successful, default is {airflow.utils.state.TaskInstanceState.SUCCESS} (templated)

  • failure_states (collections.abc.Collection[str] | None) – Collection of task instance states that would make this task marked as failed and raise an AirflowException, default is {airflow.utils.state.TaskInstanceState.FAILED} (templated)

  • waiter_delay (int) – The amount of time in seconds to wait between attempts. (default: 60)

  • waiter_max_attempts (int) – The maximum number of attempts to be made. (default: 720)

  • aws_conn_id – The Airflow connection used for AWS credentials.

success_states[source]
failure_states[source]
hook()[source]

Override in subclasses to return the right hook.

Was this entry helpful?