管理与 Apache Airflow 的连接 - Amazon Managed Workflows for Apache Airflow
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

管理与 Apache Airflow 的连接

本节介绍为 Amazon MWAA 配置 Apache Airflow 连接的不同方法。

Apache Airflow 变量和连接概述

在某些情况下,您可能需要为环境(例如 Amazon 配置文件)指定其他连接或变量,或者为 Apache Airflow 元存储中的连接对象添加执行角色,然后从 DAG 内部引用该连接。

  • 自行管理的 Apache Airflow。在自行管理的 Apache Airflow 安装中,可以在 airflow.cfg 中设置 Apache Airflow 配置选项。

    [secrets] backend = airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend backend_kwargs = {"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}
  • Amazon MWAA 上的 Apache Airflow。在 Amazon MWAA 上,您需要将这些配置设置作为 Apache Airflow 配置选项添加到 Amazon MWAA 控制台上。Apache Airflow 配置选项作为环境变量写入环境,并覆盖相同设置的所有其他现有配置。