I'm setting up a new Apache Airflow environment using MWAA with a requirements.txt
file. (AirFlow version 2.2.2)
In the requirements.txt
file, I am specifically stating a certain version of Amazon provider (apache-airflow-providers-amazon==5.1.0
).
After initializing the environment, in the Airflow UI, it says my DAGs are broken due to import errors (ModuleNotFoundError: No module named 'airflow.providers.amazon.aws.sensors.batch'
)
When opening the scheduler logs, I see that it indeed installed the requested version (5.1.0) and its dependencies, but after looking at the providers, I see that apache-airflow-providers-amazon
uses version 2.4.0; no matter what version I state in the requirements.txt
file it still shows 2.4.0.
I have updated the environment several times using different versions, but still no luck.
When running aws-mwaa-local-runner and using the same requirements.txt
file, everything works as intended; the providers are indeed the ones specified in the requirements.txt
file, and my DAGs are running.
Has anyone experienced something like that when setting up an MWAA?