New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmailOperator is not compatible with the SendGrid backend when hosted on MWAA. #19594
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
This sounds like something MWAA should handle instead? Airflow does not know it is being hosted on MWAA, only MWAA knows it’s hosting Airflow. |
@uranusjr I don't think this is smth to fixed on the MWAA, sengrid provider should follow the similar flow defined in
|
If the problem is speficically about using something other than Closing as the usage is already fixed from Airflow’s perspective. Whether |
Looks good, |
Description
Modify the SendGrid to use
from_email
from theAIRFLOW__SMTP__SMTP_MAIL_FROM
section.Use case/motivation
When we use the
EmailOperator
we can not specify theemail_from
param.When using the
email_backend = airflow.providers.sendgrid.utils.emailer.send_email
it is impossible to send the email on the MWAA since SendGrid policy requires to specify the sender email address. Sender email address can be taken from the global varSENDGRID_MAIL_FROM
which is impossible to set in the MWAA. We need to use globalAIRFLOW__SMTP__SMTP_MAIL_FROM
section as the last chance to determine the sender email.Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: