- Newest
- Most votes
- Most comments
Amazon MWAA now supports Apache Airflow version 2.10, which was released on September 26, 2024. This is the latest minor release of Apache Airflow available on MWAA.
Regarding your issue with the timezone parameter in the DAG() constructor, while this should be supported in Airflow 2.10, you might need to use an alternative approach for changing a DAG's timezone in Amazon MWAA. The recommended method is to use the Pendulum library to create timezone-aware DAGs.
For example, you can use Pendulum in your DAG definition instead of directly using the timezone parameter:
import pendulum from airflow import DAG local_tz = pendulum.timezone("US/Eastern") with DAG( 'example_dag', start_date=pendulum.datetime(2021, 1, 1, tz=local_tz), schedule_interval='0 0 * * *', ) as dag: # Your tasks here
This approach should work with Apache Airflow v2 in Python 3.10, which is compatible with MWAA. If you continue to experience issues, you might want to check if there are any specific configuration overrides in your MWAA environment that could be affecting the timezone functionality.
Sources
Amazon MWAA now supports Apache Airflow version 2.10 - AWS
Changing a DAG's timezone on Amazon MWAA - Amazon Managed Workflows for Apache Airflow
Hello AWS Support, Thank you for confirming that MWAA 2.10.1 supports Apache Airflow 2.10 and for your guidance on using Pendulum to create timezone-aware start_date values. I wanted to follow up with an important clarification: While setting a start_date with pendulum.timezone("US/Eastern") works, the execution_date provided by Airflow remains in UTC, unless we set the timezone= argument in the DAG() constructor — which MWAA currently does not support (as confirmed by the error we encountered). This means that any logic relying on execution_date (e.g., branching, scheduling alerts, file availability windows) must still perform manual timezone conversion like:
dt = kwargs["execution_date"].in_tz(pendulum.timezone("US/Eastern"))
So while the workaround works technically, we just wanted to confirm that this limitation — the lack of native DAG-level timezone handling — is expected behavior on MWAA, even in Airflow 2.10. I'd appreciate confirmation, and if there’s a roadmap for full timezone= support on MWAA, I’d be happy to track that as well.
Thanks, Jeet
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 6 months ago
