Quick verdict
Choose Apache Airflow if you want the orchestrator with the widest managed options (Astronomer, Amazon MWAA, Google's Managed Service for Apache Airflow, formerly Cloud Composer), a large provider ecosystem, and scheduling built around DAGs, time intervals and, since Airflow 3, assets. Choose Prefect if you want to orchestrate existing Python code with as little restructuring as possible, using native Python control flow, event-driven automations and a hosted control plane with a free tier. Both are free to self-host; the choice is mostly about programming model and where you want to run the control plane.
Apache Airflow is an Apache Software Foundation project that describes itself as a platform to "programmatically author, schedule, and monitor workflows". Pipelines are DAGs (directed acyclic graphs) of tasks written in Python. Airflow 3.0 was first released on 22 April 2025 and brought a new stable authoring interface (airflow.sdk), DAG versioning, scheduler-managed backfills, a rewritten React UI and the renaming of datasets to assets. The current release is 3.3.2 (17 September 2026), which supports Python 3.10 to 3.14. Airflow 2.x reached end of life on 22 April 2026, according to the Airflow version life cycle page, so new projects should start on Airflow 3.
Prefect is developed by Prefect Technologies and describes itself on PyPI as "a workflow orchestration framework for building data pipelines in Python". You decorate Python functions with @flow and @task; the open source package includes a server and UI you can self-host, and Prefect Cloud is the vendor's hosted control plane. The current release is 3.8.8 (6 October 2026), which supports Python 3.10 to 3.14.
Both are orchestrators: they decide when code runs, in what order, with what retries, and show you what happened. Neither is a connector-based ingestion product. If you are deciding between writing pipelines and buying connectors, see Apache Airflow vs Airbyte and Apache Airflow vs Fivetran.
Side by side
| Aspect | Apache Airflow | Prefect |
|---|---|---|
| Programming model | DAGs of tasks, written with the TaskFlow API (@dag, @task) or operators |
Python functions decorated with @flow and @task; native Python control flow, no DAG declared up front |
| Current version | 3.3.2 (September 2026); Airflow 2.x is end of life | 3.8.8 (October 2026) |
| Licence | Apache-2.0 | Apache-2.0 (open source package and self-hosted server) |
| Scheduling | Cron and presets, timetables, asset-aware scheduling, event-driven scheduling through AssetWatchers | Cron, interval and RRule schedules on deployments; event-driven automations |
| Running work | Scheduler plus executors (for example LocalExecutor, Celery, Kubernetes, Edge Executor) | Deployments served from a process (flow.serve) or run by workers from work pools; push and managed pools in Prefect Cloud |
| Self-hosting | Scheduler, API server, metadata database (PostgreSQL or MySQL in production); official Helm chart | prefect server start, Docker or Helm; PostgreSQL required for multi-server deployments |
| Managed options | Astronomer (Astro), Amazon MWAA and MWAA Serverless, Google Managed Service for Apache Airflow (formerly Cloud Composer) | Prefect Cloud (vendor-hosted); no third-party managed Prefect from the major clouds |
| Free hosted tier | None from the managed vendors checked; free trials on Astro | Prefect Cloud Hobby plan, free, with limits |
| Main trade-off | More concepts and more infrastructure to run yourself; code must fit the DAG model | Smaller ecosystem of managed hosts; some features, such as serverless push pools and RBAC, are Prefect Cloud only |
Key differences
Programming model: DAGs of tasks versus decorated Python functions
The same small pipeline (extract a few orders, total them, print the result, every day at 06:00 UTC) looks similar in both tools, but the structure differs. In Airflow the @dag function declares a graph that the scheduler parses; the task calls inside it build dependencies rather than running code. In Prefect the @flow function is ordinary Python that runs top to bottom, and tasks run when they are called. Both examples follow the official tutorials and were syntax-checked with Python 3.14.
# Apache Airflow 3 (TaskFlow API, airflow.sdk)
import pendulum
from airflow.sdk import dag, task
@dag(
schedule="0 6 * * *",
start_date=pendulum.datetime(2026, 1, 1, tz="UTC"),
catchup=False,
tags=["orders"],
)
def daily_orders():
@task(retries=2)
def extract() -> list[dict]:
return [{"id": 1, "amount": 120.0}, {"id": 2, "amount": 80.0}]
@task()
def transform(rows: list[dict]) -> float:
return sum(r["amount"] for r in rows)
@task()
def load(total: float) -> None:
print(f"Total order value: {total:.2f}")
load(transform(extract()))
daily_orders()# Prefect 3
from prefect import flow, task
@task(retries=2)
def extract() -> list[dict]:
return [{"id": 1, "amount": 120.0}, {"id": 2, "amount": 80.0}]
@task
def transform(rows: list[dict]) -> float:
return sum(r["amount"] for r in rows)
@task
def load(total: float) -> None:
print(f"Total order value: {total:.2f}")
@flow(log_prints=True)
def daily_orders():
rows = extract()
total = transform(rows)
load(total)
if __name__ == "__main__":
daily_orders.serve(name="daily-orders", cron="0 6 * * *")The practical consequence: Prefect's documentation says workflows are not restricted to predefined DAGs, so loops, conditions and branching are written in plain Python, and a flow can be called like a normal function in a test or a notebook. Airflow's model is more explicit: the graph is known before a run starts, which is what drives its Grid and Graph views, backfills and DAG versioning. Since Airflow 3, task code also can no longer import Airflow's database sessions or models directly; the upgrade guide points to the Airflow Python client instead.
Scheduling and triggers
Airflow schedules DAGs with cron expressions, presets such as @daily and custom timetables. Its asset-aware scheduling lets a DAG run when upstream tasks update an Asset (the concept was called a dataset before Airflow 3.0), with & and | for combined conditions. External events can arrive through the REST API or through AssetWatchers that poll an external source. Airflow 3 changed two defaults worth knowing: catchup is now False, and backfills are run by the scheduler and can be started from the UI. SLAs were deprecated and replaced by Deadline Alerts.
Prefect attaches schedules to deployments: cron, interval (seconds, ISO 8601 durations) and RRule for calendar rules such as "the last weekday of each month". Schedules can be set in code, in prefect.yaml, in the CLI or in the UI. Beyond time, Prefect's automations link triggers (flow run state changes, deployment or work pool status, metric thresholds, custom events, or the absence of an expected event) to actions such as running a deployment, pausing a schedule or sending a notification. Most automation actions work on the self-hosted server; the dedicated email action and incident declaration are Prefect Cloud only.
UI and observability
Airflow 3 ships a rewritten React UI. Its documentation describes a home page with health indicators, a Dags list, a Grid view that it calls "the primary interface for inspecting Dag runs and task states", a Graph view of task dependencies, task instance pages with logs and XComs, asset list and asset graph views, and admin pages for connections, variables and pools. DAG versioning means the UI can show which version of the code a past run used.
Prefect's self-hosted server and Prefect Cloud both provide a UI for flow runs, task runs, deployments, work pools and automations. Prefect Cloud adds workspaces and user management, plus role-based access control, SSO and audit logs on its paid plans, and AI-generated log summaries in automation templates. Prefect documents RBAC as a Prefect Cloud feature, so on a self-hosted server you should plan how to control access to the server yourself.
Deployment: self-hosted, managed Airflow or Prefect Cloud
Self-hosted Airflow means running a scheduler, an API server (which serves the UI), a DAG processor, workers for your chosen executor and a metadata database; PyPI lists PostgreSQL 14 to 18 and MySQL 8.0 or later as tested. The project publishes an official Helm chart and recommends installing with its constraint files. Managed Airflow is available from several vendors, and all three checked offer Airflow 3: Astronomer's Astro Runtime 3.3-8 is based on Airflow 3.3.2; Amazon MWAA lists Airflow 3.3.1 as its newest version and also offers MWAA Serverless (announced November 2025), which runs each task on its own ECS Fargate container; and Google's Managed Service for Apache Airflow, which Google says "previously known as Cloud Composer", lists Airflow 3.3.1 builds in its third generation.
Self-hosted Prefect starts with prefect server start, or the prefecthq/prefect Docker image, or a Helm chart; SQLite works for a single server, but the docs say PostgreSQL 14.9 or higher is required for multi-server deployments. Work runs where you put a worker: process, Docker and Kubernetes work pools are available on a self-hosted server. Prefect Cloud hosts the API, database and UI for you, and adds push work pools (AWS ECS, Google Cloud Run, Azure Container Instances, Modal) that need no worker, plus Prefect Managed pools and Prefect Serverless compute. There is no Prefect equivalent of MWAA from a cloud provider, so a managed Prefect control plane means Prefect Cloud.
Pricing and licensing
Apache Airflow is free and open source under the Apache-2.0 licence. Self-hosting costs are your own infrastructure. Managed services charge by usage: Astronomer bills deployments by the hour plus worker compute while tasks run; as listed on its pricing page in October 2026, Developer plan deployments start at USD 0.35 per hour, with Business and Enterprise plans priced on request. Amazon MWAA bills environments by the hour by size, plus additional workers, schedulers, web servers and metadata storage (see the AWS pricing page for regional rates). Google's Managed Service for Apache Airflow has its own usage-based pricing; use Google's pricing page and calculator for an estimate.
Prefect (the open source package and server) is free under the Apache-2.0 licence. Prefect Cloud has four plans. As listed on prefect.io/pricing in October 2026: Hobby is free (2 users, 1 workspace, up to 5 deployments, 500 minutes per month of Prefect Serverless, 7 days of run retention); Starter is USD 100 per month, billed monthly (3 users, up to 20 deployments); Team is priced per user per month; Enterprise is custom and billed annually.
We describe pricing models only and do not estimate bills: real cost depends on how many deployments, workers and runs you have and how long they run. We describe licence terms; take your own advice on licence obligations.
Pricing checked on the vendors' official pages on 7 October 2026. Prices change; confirm before buying.
Where each one leads
Apache Airflow strengths
- Explicit DAG model that drives the Grid and Graph views, backfills and DAG versioning
- Asset-aware and event-driven scheduling in Airflow 3, with AND/OR conditions across assets
- The widest choice of managed services: Astronomer, Amazon MWAA (including Serverless) and Google's Managed Service for Apache Airflow
- Large ecosystem of provider packages and operators for databases and cloud services
- Apache Software Foundation governance and a published version life cycle
Prefect strengths
- Orchestrates ordinary Python functions with native loops, conditions and branching
- Flows can be called like normal functions, which makes local testing simple
- Automations react to events, state changes, metric thresholds and missing events
- Prefect Cloud has a free Hobby tier and serverless push work pools that need no worker
- Simple start: flow.serve runs a scheduled deployment from a single process
Limitations
Apache Airflow limitations
- More moving parts to self-host: scheduler, API server, DAG processor, workers and a metadata database
- Airflow 3 dropped SubDAGs, SLAs, the execution_date context variable and direct database access from tasks, so Airflow 2 code needs migration work
- Airflow 2.x reached end of life on 22 April 2026, so older deployments must upgrade
- Managed services lag the open source release; MWAA and Google listed 3.3.1 when 3.3.2 was current
Prefect limitations
- Fewer hosting choices: a managed control plane means Prefect Cloud
- Role-based access control, SSO and audit logs are documented as Prefect Cloud features, not part of the self-hosted server
- Push work pools, Prefect Managed pools and some automation actions require Prefect Cloud
- Prefect Cloud plan limits (deployments, users, run retention) need checking as usage grows
When to choose each
Choose Apache Airflow if
- You want a managed service from your cloud provider (AWS or Google Cloud) or from Astronomer
- Your team already runs Airflow or knows its DAG and operator model
- You rely on provider packages and operators for many external systems
- You want asset-aware scheduling and backfills managed by the scheduler
Choose Prefect if
- You have existing Python scripts and want to orchestrate them with minimal restructuring
- Your workflows branch or loop dynamically at run time
- You want event-driven automations, including alerts when an expected run does not happen
- A small team wants a hosted control plane with a free tier to start
When neither is right
- You think in terms of data assets (tables, files, models) and want lineage and freshness at the centre: look at Dagster; see Apache Airflow vs Dagster and Prefect vs Dagster.
- You mainly need to copy data from SaaS applications and databases into a warehouse: a connector-based ingestion tool may be enough on its own; see Apache Airflow vs Airbyte, Apache Airflow vs Fivetran and the best ETL tools guide.
- Your transformations are all SQL inside one database: the database's own scheduler, such as SQL Server Agent or pg_cron for PostgreSQL, may be simpler than a separate orchestrator. See ETL vs ELT for where transformation usually happens.
Final recommendation
Both are capable, Apache-2.0 licensed Python orchestrators, and neither has a licence cost for self-hosting. Apache Airflow is the safer default where you want a managed service from your cloud provider or Astronomer, where the team already knows it, or where its provider ecosystem covers your systems; Airflow 3 modernised its UI, added DAG versioning and made assets first-class. Prefect suits teams who want to orchestrate Python they already have, with native control flow and event-driven automations, and who are happy with Prefect Cloud, or their own server, as the control plane. If your pipelines are really about producing tables and keeping them fresh, compare Dagster before deciding.
Frequently asked questions
Is Prefect a replacement for Airflow?
It can be, for orchestrating Python workflows: both schedule, retry and monitor code. The differences are the programming model (Prefect uses decorated functions with native Python control flow; Airflow declares DAGs) and hosting (Airflow has several managed services; managed Prefect means Prefect Cloud). Migrating existing Airflow DAGs is a rewrite rather than a conversion.
Are Airflow and Prefect free?
Both open source projects are free under the Apache-2.0 licence and can be self-hosted. Paid options are managed services: Astronomer, Amazon MWAA and Google's Managed Service for Apache Airflow for Airflow, and Prefect Cloud, which also has a free Hobby plan, for Prefect.
What changed in Airflow 3?
According to the Airflow release notes and upgrade guide, Airflow 3.0 (April 2025) added the airflow.sdk authoring interface, DAG versioning, scheduler-managed backfills, a rewritten React UI, the Task Execution API and Edge Executor, and renamed datasets to assets. It replaced SubDAGs with TaskGroups and assets and SLAs with Deadline Alerts, removed context variables such as execution_date, and made catchup False by default.
Does Prefect need a DAG?
No. Prefect's documentation says workflows are not restricted to predefined DAGs; the flow is a Python function, and tasks run as they are called, so loops and conditions are ordinary Python. Prefect still tracks the task runs and their dependencies for the UI.
Is Cloud Composer still available?
Yes, under a new name. Google's documentation calls it Managed Service for Apache Airflow, "previously known as Cloud Composer", and its third generation lists Airflow 3.3.1 builds alongside supported Airflow 2 versions.
Sources
- Apache Airflow release notes
- Apache Airflow: Upgrading to Airflow 3
- Apache Airflow: Supported versions (version life cycle)
- Apache Airflow: TaskFlow tutorial
- Apache Airflow: Asset-aware scheduling
- Apache Airflow: UI overview
- apache-airflow on PyPI
- Prefect documentation: Quickstart
- Prefect documentation: Schedules
- Prefect documentation: Automations
- Prefect documentation: Work pools
- Prefect documentation: Self-hosted server
- Prefect Cloud pricing
- prefect on PyPI
- Astronomer pricing
- Amazon MWAA: Supported Airflow versions
- Google Cloud: Managed Service for Apache Airflow (formerly Cloud Composer) documentation
Checked October 2026.
How we research comparisons: our editorial method.