How to set Emails Alert in MWAA?

Viewed 2014

Where can I find airflow.cfg file to setup email alerts in MWAA? In Airflow we setup in airflow.cfg file but Amazon Managed Apache Airflow is Serverless so where can to the configuration changes ? Do I also need to create my own .cfg file in S3 location like we have mentioned dags Directory in s3 location

1 Answers

You cant provide MWAA airflow.cfg file, but you can override configuration.

The following procedure walks you through the steps of adding an Airflow configuration option to your environment.

  1. Open the Environments page on the Amazon MWAA console.
  2. Choose an environment.
  3. Choose Edit.
  4. Choose Next.
  5. Choose Add custom configuration in the Airflow configuration options pane.
  6. Choose a configuration from the dropdown list and enter a value, or type a custom configuration and enter a value.
  7. Choose Add custom configuration for each configuration you want to add.
  8. Choose Save.

AWS console Airflow configuration options

You can read more about it here

You can also configure these options using cloudformation:

  MWAA:
    Type: AWS::MWAA::Environment
    Properties:
      Name: "my-mwaa"
      AirflowVersion: "2.0.2"
      EnvironmentClass: "mw1.small"
      WebserverAccessMode: "PUBLIC_ONLY"
      AirflowConfigurationOptions:
        scheduler.catchup_by_default: False
        smtp.smtp_host: "email-smtp.us-west-2.amazonaws.com"
        smtp.smtp_user: "USER"
        smtp.smtp_password: "AAAAAAAAAAAAA"
        smtp.smtp_port: 587
        smtp.smtp_mail_from: "email@example.com"
Related