Airflow
Requirements Folder
DAGs are just Python, so if a DAG imports pandas, boto3, or any other third-party
package, that package needs to be installed into the Airflow environment itself —
declared in a requirements.txt and installed at image build time (Docker) or
environment setup time (MWAA).
Why it matters in practice:
- Not automatic — Airflow doesn’t install DAG-level imports on the fly; missing packages fail at DAG parse time, not just at task run time
- Version pinning — Airflow itself has known-compatible constraint files per version; unpinned installs can break the Scheduler, not just your DAG
- Rebuild required — changing
requirements.txtmeans rebuilding the image/ environment, not just editing a DAG file
See also: Plugins