Airflow + AWS SES (HTTP API not SMTP one): error Invalid type for parameter Source, value: None, type: <class 'NoneType'>, valid types: <class 'str'>

Viewed 289

I am trying to configure airflow to send an email using AWS SES(HTTP) email backend. The configuration is done according to https://airflow.apache.org/docs/apache-airflow/stable/howto/email-config.html. But I always get an error "Invalid type for parameter Source". This comes from AWS API where it validates source/from parameter should not be null. But, airflow email API does not accept the parameter code snippet below(ref: https://github.com/apache/airflow/blob/main/airflow/utils/email.py). So my question is how to send the source/from-email parameter. Is there any configuration parameter airflow config file or it takes from AWS IAM credential. I am using AWS IAM credential set with AIRFLOW__EMAIL__EMAIL_CONN_ID parameter in airflow.

def send_email(
    to: Union[List[str], Iterable[str]],
    subject: str,
    html_content: str,
    files: Optional[List[str]] = None,
    dryrun: bool = False,
    cc: Optional[Union[str, Iterable[str]]] = None,
    bcc: Optional[Union[str, Iterable[str]]] = None,
    mime_subtype: str = 'mixed',
    mime_charset: str = 'utf-8',
    conn_id: Optional[str] = None,
    **kwargs,
):
0 Answers
Related