Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

426
Visualizações
Airflow - Send email with AWS SES

Trying to send an email from apache airflow using AWS Simple Email Service (SES), and it's returning errors that are not helping me solve the problem. I believe it's a configuration issue within SES, but I'm not sure what to change.

General info:

  • New SES instance, verified email.
  • Airflow 1.10.10 running on Ubuntu 18.04 (local laptop).
  • Same situation from EC2 instance on a separate AWS account.
  • Running 1 DAG with a python operator that works fine.
  • Sending email works with gmail smtp settings and an app password.

Abbreviated DAG code:

...
from airflow.operators.email_operator import EmailOperator
...
email_status = EmailOperator(
        task_id="sending_status_email",
        to="myverifiedemail@mydomain.com",
        subject="Test from SES",
        html_content="Trying to send an email from airflow through SES.",
        dag=dag
)
...

airflow.cfg SMTP Settings:

smtp_host = email-smtp.us-east-1.amazonaws.com
smtp_starttls = True
smtp_ssl = False
smtp_user = AWSUSERKEY
smtp_password = PASSWORDFROMAWSSMTP
smtp_port = 587
smtp_mail_from = myverifiedemail@mydomain.com

Errors Received while trying various changes to starttls, ssl, and port settings.

ERROR - (554, b'Transaction failed: Unsupported encoding us_ascii.')
ERROR - STARTTLS extension not supported by server.
ERROR - (SSL: WRONG_VERSION_NUMBER) wrong version number (_ssl.c:852)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Not sure about the others but we just ran into this error today:

ERROR - (554, b'Transaction failed: Unsupported encoding us_ascii.')

This is the default value in the class's __init__ method, which isn't valid: https://github.com/apache/airflow/blob/1.10.10/airflow/operators/email_operator.py#L63

You can fix it by passing in a valid value, like "utf-8":

email_status = EmailOperator(
        mime_charset='utf-8',
        task_id="sending_status_email",
        to="myverifiedemail@mydomain.com",
        subject="Test from SES",
        html_content="Trying to send an email from airflow through SES.",
        dag=dag
)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda