title: AWS MWAA/Apache airflow: how to debug on_failure_callback itself
body: <p>Have a dag like this:</p>
  <pre><code>import os
  from datetime import timedelta
  
  from xxx import on_failure_opsgenie
   
  from airflow import DAG
  from airflow.operators.python import PythonOperator
  from airflow.utils.dates import days_ago
   
  DAG_ID = os.path.basename(__file__).replace(&quot;.py&quot;, &quot;&quot;)
  
  DEFAULT_ARGS = {
      &quot;owner&quot;: &quot;airflow&quot;,
      &quot;depends_on_past&quot;: False,
      &quot;email&quot;: [&quot;airflow@example.com&quot;],
      &quot;email_on_failure&quot;: False,
      &quot;email_on_retry&quot;: False,
  }
   
   
  def kaboom(*args, **kwargs):
      print(&quot;goodbye cruel world&quot;)
      print(args)
      print(kwargs)
      assert 1 == 2
   
   
  with DAG(
      dag_id=DAG_ID,
      default_args=DEFAULT_ARGS,
      description=&quot;Print contents of airflow.cfg to logs&quot;,
      dagrun_timeout=timedelta(hours=2),
      start_date=days_ago(1),
      schedule_interval=None,
      on_failure_callback=on_failure_opsgenie,
  ) as dag:
      get_airflow_cfg_operator = PythonOperator(task_id=&quot;gonna_explode&quot;, python_callable=kaboom)
  </code></pre>
  <p>The DAG fails as expected, purposefully. However, <code>on_failure_opsgenie</code> is not doing what it should; how do I get the logs or debug a failed on-failure-callback in AWS MWAA?</p>