Running Apache Airflow Pipelines with Amazon MWAA
This lesson explains how Amazon Managed Workflows for Apache Airflow (Amazon MWAA) runs Airflow without managing its infrastructure, for teams that already write Airflow DAGs or need its rich scheduling.
Learning outcomes
After completing this lesson, you will be able to:
- Describe DAGs, tasks and operators.
- Describe how an MWAA environment is set up.
- Troubleshoot common MWAA problems.
- Decide when MWAA is the right orchestrator.
Airflow concepts
Amazon Managed Workflows for Apache Airflow (MWAA) runs Airflow, whose pipelines are built from a few concepts. A DAG, a directed acyclic graph, is a pipeline written in Python that defines its steps and the order between them. Each step is a task. Most tasks are operators, which do something, such as starting a Glue job or running a Redshift query. Sensors are tasks that wait for a condition, such as a file appearing in S3, before later tasks run. The scheduler starts each task once its schedule and its upstream dependencies are met. The following table summarises the concepts.
| Concept | Meaning |
|---|---|
| DAG | A pipeline (directed acyclic graph) written in Python |
| Task | A step in the DAG |
| Operator | A task that does something |
| Sensor | A task that waits for something, such as a file in S3 |
| Scheduler | Runs each task when its dependencies and schedule are met |
Airflow vocabulary
How MWAA is set up
Amazon Managed Workflows for Apache Airflow (MWAA) runs Apache Airflow environments without the customer managing servers. DAG files, which define the pipelines, the requirements.txt file listing Python packages, and any plugins are stored in an S3 bucket, from which MWAA loads them. MWAA runs the Airflow scheduler, auto-scaling workers and the web server inside the customer's VPC, and environment classes, from small to extra large, size the scheduler and workers.
The Amazon provider package for Airflow includes operators and sensors for AWS Glue, Amazon EMR, EMR Serverless, Amazon Athena, Amazon Redshift, Amazon S3, AWS Lambda, AWS Step Functions and Amazon SageMaker AI. Airflow adds retries, backfills that run a DAG for past intervals, SLAs, and connections that can be stored in AWS Secrets Manager.
The following diagram shows where MWAA's files and components sit.

Troubleshooting
Problems in Amazon MWAA usually arise from a small number of causes. The following table pairs common symptoms with their likely causes.
| Symptom | Likely cause |
|---|---|
| A DAG does not appear | An import error (see DAG processing logs) or a package missing from requirements.txt |
| Tasks fail calling AWS | Missing permissions in the execution role, or VPC networking with no route to endpoints |
Scheduler, worker, web server, DAG processing and task logs all go to CloudWatch.
MWAA problems
Choosing MWAA
A data team already writes its pipelines as Apache Airflow DAGs in Python, with dozens of operators for databases and SaaS tools, and wants to stop running its own Airflow servers.
MWAA fits because the DAGs already exist. A new team starting from scratch, with mostly AWS services to orchestrate and occasional runs, would more likely choose Step Functions. When an MWAA DAG fails to appear, the first checks are the DAG file in the S3 bucket and the dependencies in requirements.txt.
Where are extra Python packages for MWAA DAGs specified?
Show answer
In requirements.txt in the environment's S3 bucket.
Exam Tips
Remember for the exam
- Existing Airflow DAGs or Airflow skills point to MWAA.
- Python packages for DAGs go in requirements.txt in the S3 bucket.
- If a DAG does not appear in the UI, check the DAG processing logs for import errors.
- To wait for a file before running a task, use an S3 sensor.
- To re-run a pipeline for past dates, use an Airflow backfill.