

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Amazon MWAA 上的 Apache Airflow 版本
<a name="airflow-versions"></a>

本主题介绍 Amazon MWAA 支持的 Apache Airflow 版本，以及升级到最新版本的最佳实践。

**Topics**
+ [

## 关于 Amazon MWAA 版本
](#airflow-versions-image)
+ [

## 最新版本
](#airflow-versions-latest)
+ [

## Apache Airflow 版本
](#airflow-versions-official)
+ [

## Apache Airflow 组件
](#airflow-versions-components)
+ [

## 升级 Apache Airflow 版本
](#airflow-versions-upgrade)
+ [

## 降级 Apache Airflow 版本
](#airflow-versions-downgrade)
+ [

## Apache Airflow 已弃用版本
](#airflow-versions-deprecation)
+ [

## Apache Airflow 版本支持和常见问题
](#airflow-versions-support)

## 关于 Amazon MWAA 版本
<a name="airflow-versions-image"></a>

Amazon MWAA 构建的容器镜像将 Apache Airflow 版本与其他常见的二进制文件和 Python 库捆绑在一起。该镜像使用您指定的版本的 Apache Airflow 基础版安装。创建环境时，需要指定要使用的镜像版本。环境创建后会一直使用指定的镜像版本，直到您将其升级到更高版本。

## 最新版本
<a name="airflow-versions-latest"></a>

Amazon MWAA 支持多个 Apache Airflow 版本。如果您在创建环境时未指定镜像版本，则 Amazon MWAA 会使用支持的最新版本的 Apache Airflow 创建环境。

## Apache Airflow 版本
<a name="airflow-versions-official"></a>

Amazon MWAA 上支持以下 Apache Airflow 版本。

**注意**  
自 2025 年 12 月 30 日起，Amazon MWAA 将终止对 Apache Airflow 版本 v2.4.3、v2.5.1 和 v2.6.3 的支持。有关更多信息，请参阅[Apache Airflow 版本支持和常见问题](#airflow-versions-support)。
从 Apache Airflow v2.2.2 开始，Amazon MWAA 支持直接在 Apache Airflow Web 服务器上安装 Python 要求、提供程序包和自定义插件。
 从 Apache Airflow v2.7.2 开始，要求文件必须包含一条 `--constraint` 语句。如果您未提供约束条件，Amazon MWAA 将为您指定一个约束条件，以确保您的要求中列出的程序包与您正在使用的 Apache Airflow 版本兼容。  
有关在需求文件中设置约束条件的更多信息，请参阅[安装 Python 依赖项](working-dags-dependencies.md#working-dags-dependencies-syntax-create)。


| Apache Airflow 版本 | Apache Airflow 发布日期 | Amazon MWAA 上市日期 | Apache Airflow 约束条件 | Python 版本 | 
| --- | --- | --- | --- | --- | 
|  [v2.11.0](https://airflow.apache.org/docs/apache-airflow/2.11.0)  |  [2025年5月20日](https://airflow.apache.org/docs/apache-airflow/2.11.0/release_notes.html#airflow-2-11-0-2022-05-20)  |  2026年1月7日  |  [v2.11.0 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.11.0/constraints-3.12.txt)  |  [Python 3.12](https://peps.python.org/pep-0693/)  | 
|  [v3.0.6](https://airflow.apache.org/docs/apache-airflow/3.0.6)  |  [2025 年 8 月 29 日](https://airflow.apache.org/docs/apache-airflow/3.0.6/release_notes.html#airflow-3-0-6-2025-08-29)  |  2025 年 10 月 1 日  |  [v3.0.6 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-3.0.6/constraints-3.12.txt)  |  [Python 3.12](https://peps.python.org/pep-0693/)  | 
|  [v2.10.3](https://airflow.apache.org/docs/apache-airflow/2.10.3)  |  [2024 年 11 月 4 日](https://airflow.apache.org/docs/apache-airflow/2.10.3/release_notes.html#airflow-2-10-3-2024-11-04)  |  2024 年 12 月 18 日  |  [v2.10.3 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.11.txt)  |  [Python 3.11](https://peps.python.org/pep-0664/)  | 
|  [v2.10.1](https://airflow.apache.org/docs/apache-airflow/2.10.1)  |  [2024 年 9 月 5 日](https://airflow.apache.org/docs/apache-airflow/2.10.1/release_notes.html#airflow-2-10-1-2024-09-05)  |  2024 年 9 月 26 日  |  [v2.10.1 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.10.1/constraints-3.11.txt)  |  [Python 3.11](https://peps.python.org/pep-0664/)  | 
|  [v2.9.2](https://airflow.apache.org/docs/apache-airflow/2.9.2)  |  [2024 年 6 月 10 日](https://airflow.apache.org/docs/apache-airflow/2.10.1/release_notes.html#airflow-2-9-2-2024-06-10)  |  2024 年 7 月 9 日  |  [v2.9.2 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.9.2/constraints-3.11.txt)  |  [Python 3.11](https://peps.python.org/pep-0664/)  | 
|  [v2.8.1](https://airflow.apache.org/docs/apache-airflow/2.8.1)  |  [2024 年 1 月 19 日](https://airflow.apache.org/docs/apache-airflow/2.10.1/release_notes.html#airflow-2-8-1-2024-01-19)  |  2024 年 2 月 23 日  |  [v2.8.1 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.11.txt)  |  [Python 3.11](https://peps.python.org/pep-0664/)  | 
|  [v2.7.2](https://airflow.apache.org/docs/apache-airflow/2.7.2)  |  [2023 年 10 月 12 日](https://airflow.apache.org/docs/apache-airflow/2.10.1/release_notes.html#airflow-2-7-2-2023-10-12)  |  2023 年 11 月 6 日  |  [v2.7.2 约束文件](https://raw.githubusercontent.com/apache/airflow/constraints-2.7.2/constraints-3.11.txt)  |  [Python 3.11](https://peps.python.org/pep-0664/)  | 

有关迁移自管理的 Apache Airflow 部署或迁移现有 Amazon MWAA 环境的更多信息，包括备份元数据数据库的说明，请参阅 [Amazon MWAA 迁移指南](https://docs.aws.amazon.com/mwaa/latest/migrationguide/index.html)。

## Apache Airflow 组件
<a name="airflow-versions-components"></a>

本节描述了 Amazon MWAA 上每个 Apache Airflow 版本可用的 Apache Airflow 计划程序和工作线程的数量，并提供了 Apache Airflow 的关键功能列表，指出了支持每项功能的版本。

### 调度器
<a name="airflow-versions-components-schedulers"></a>

Apache Airflow v2 及更高版本的计划程序：


| 计划程序（默认值） | 计划程序（最小值） | 计划程序（最大值） | 
| --- | --- | --- | 
|  2  |  2  |  5  | 

### 工作线程
<a name="airflow-versions-components-workers"></a>

Apache Airflow v2 及更高版本的工作线程：


| 工作线程（默认值） | 工作线程（最小值） | 工作线程（最大值） | 
| --- | --- | --- | 
|  10  |  1  |  25  | 

## 升级 Apache Airflow 版本
<a name="airflow-versions-upgrade"></a>

 Amazon MWAA 支持次要版本升级。这意味着您可以将环境从版本 `x.1.z` 升级到 `x.2.z`，但不能升级到新的主要版本，例如，从 `1.y.z` 升级到 `2.y.z`。

有关更多信息以及关于更新工作流程资源和将环境升级到新版本的详细说明，请参阅 [更改 Apache Airflow 版本](upgrading-environment.md)。

## 降级 Apache Airflow 版本
<a name="airflow-versions-downgrade"></a>

 Amazon MWAA 支持将次要版本降级到在降级时仍受支持的较早版本。这意味着您可以将环境从版本 `x.2.z` 降级到 `x.1.z`，但不能降级到以前的主要版本，例如，从 `2.y.z` 降级到 `1.y.z`。

有关更多信息以及关于更新工作流程资源和将环境升级到新版本的详细说明，请参阅 [更改 Apache Airflow 版本](upgrading-environment.md)。

## Apache Airflow 已弃用版本
<a name="airflow-versions-deprecation"></a>

下表列出了亚马逊 MWAA 中已弃用的 Apache Airflow 版本，以及每个版本的初始发布和日期。 end-of-support有关迁移到更新版本的更多信息，请参阅 [Amazon MWAA 迁移指南](https://docs.aws.amazon.com/mwaa/latest/migrationguide/about-mwaa-migration.html)。


| Apache Airflow 版本 | Apache Airflow 发布日期 | Amazon MWAA 上市日期 | 亚马逊 MWAA 日期 end-of-support | 
| --- | --- | --- | --- | 
| v1.10.12 | 2020 年 8 月 25 日 | 2020 年 11 月 24 日 | 2024 年 2 月 21 日 | 
| v2.0.2 | 2021 年 4 月 19 日 | 2021 年 5 月 25 日 | 2024 年 4 月 29 日 | 
| v2.2.2 | 2021 年 11 月 15 日 | 2022 年 1 月 27 日 | 2024 年 6 月 27 日 | 
| v2.4.3 | 2022 年 11 月 14 日 | 2023 年 1 月 5 日 | 2025 年 12 月 30 日 | 
| v2.5.1 | 2023 年 1 月 20 日 | 2023 年 4 月 11 日 | 2025 年 12 月 30 日 | 
| v2.6.3 | 2023 年 7 月 10 日 | 2023 年 8 月 9 日 | 2025 年 12 月 30 日 | 

## Apache Airflow 版本支持和常见问题
<a name="airflow-versions-support"></a>

根据 Apache Airflow 社区的[发布流程和版本政策](https://airflow.apache.org/docs/apache-airflow/stable/release-process.html)，Amazon MWAA 承诺在任何给定时间至少支持三个 Apache Airflow 次要版本。我们将在支持终止日期前至少 180 天宣布给定 Apache Airflow 次要版本的终止支持日期。

### 常见问题
<a name="deprecation-faq"></a>

**问：Amazon MWAA 支持 Apache Airflow 版本多长时间？**  
答：Amazon MWAA 在 Apache Airflow 补丁版本上市后支持至少 12 个月。

**问：当对 Amazon MWAA 上的 Apache Airflow 版本的支持结束时，我是否会收到通知？**  
答：能。如果您账户中的任何 Amazon MWAA 环境在支持快要结束时运行该版本，则 Amazon MWAA 会在支持结束日期之前发出通知。 Health Dashboard 

**问：支持结束之日会发生什么？**  
答：在支持日期结束后，您将无法再使用弃用版本创建新的 Amazon MWAA 环境。您能够继续访问运行关联的已弃用 Apache Airflow 版本的现有 Amazon MWAA 环境，但相关风险由您自行承担。要在 Amazon MWAA 上升级到更新版本的 Apache Airflow，请参阅[《Amazon MWAA 迁移指南》](https://docs.aws.amazon.com/mwaa/latest/migrationguide/index.html)。

**重要**  
您有责任保持您的 Amazon MWAA 版本为最新版本。 AWS 敦促所有客户将其的 Amazon MWAA 环境升级到最新版本，以便从最新的安全、隐私和可用性保护措施中受益。如果您在弃用日期之后在不受支持的版本或软件（简称*旧版本*）上运行环境，则更有可能面临安全、隐私和运营风险，包括停机事件。在旧版本上运行您的 Amazon MWAA 环境，即表示您确认自己了解并在知情的情况下承担这些风险，并且您同意尽快完成到最新版本的升级。在旧版本上继续运行您的环境需遵守管理您使用 AWS 服务的协议。  
旧版本不被视为普遍可用， AWS 也不再为旧版本提供支持。因此， AWS 如果 AWS 确定旧版本对服务、其关联公司或任何其他第三方构成安全或责任风险或损害风险，则可以随时限制访问或使用任何旧版本。 AWS如果您决定继续在旧版本上中运行工作负载，可能会导致您的内容不可用、损坏或无法恢复。在旧版本上运行的环境受服务水平协议（SLA）例外条款的约束。  
在旧版本上运行的环境和相关软件可能包含漏洞、错误、缺陷和有害组件。因此，尽管协议或服务条款中有任何相反的信息，但仍按原*样 AWS *提供旧版本。  
有关分担责任模型 AWS的更多信息，请参阅 Well-Architected Framework *AWS 中的分[担责任](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/shared-responsibility.html)。*