

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

# 访问 Apache Airflow
<a name="access-airflow-ui"></a>

Amazon MWAA 提供了多种访问 Apache Airflow 环境的方法：Apache Airflow 用户界面 (UI) 控制台、Apache Airflow CLI 和 Apache Airflow REST API。你可以使用 Amazon MWAA 控制台在 Apache Airflow 用户界面中访问和调用 DAG，也可以使用亚马逊 APIs MWAA 获取令牌并调用 DAG。本节介绍访问 Apache Airflow UI 所需的权限、如何生成令牌以直接在命令 shell 中调用 Amazon MWAA API，以及 Apache Airflow CLI 中支持的命令。

**Topics**
+ [先决条件](#access-airflow-ui-prereqs)
+ [打开 Apache Airflow UI](#access-airflow-ui-onconsole)
+ [登录 Apache Airflow](#airflow-access-and-login)
+ [创建 Apache Airflow Web 服务器访问令牌](call-mwaa-apis-web.md)
+ [为 Apache Airflow Web 服务器设置自定义域](configuring-custom-domain.md)
+ [创建 Apache Airflow CLI 令牌](call-mwaa-apis-cli.md)
+ [使用 Apache Airflow REST API](access-mwaa-apache-airflow-rest-api.md)
+ [Apache Airflow CLI 命令参考](airflow-cli-command-reference.md)

## 先决条件
<a name="access-airflow-ui-prereqs"></a>

下一节介绍使用本节中的命令和脚本所需的初步步骤。

### 访问
<a name="access-airflow-ui-prereqs-access"></a>
+ Amazon Web Services 账户 在 Amazon Identity and Access Management (IAM) 中访问中的亚马逊 MWAA 权限策略。[Apache Airflow 用户界面访问策略：亚马逊 MWAAWeb ServerAccess](access-policies.md#web-ui-access)
+ Amazon Web Services 账户 在 Amazon Identity and Access Management (IAM) 中访问亚马逊 MWAA 权限策略。[完整的 API 和控制台访问政策：Amazon MWAAFull ApiAccess](access-policies.md#full-access-policy)

### Amazon CLI
<a name="access-airflow-ui-prereqs-cli"></a>

 Amazon Command Line Interface (Amazon CLI) 是一个开源工具，您可以使用命令行 shell 中的命令与 Amazon 服务进行交互。要完成本节中的步骤，您需要以下满足以下条件：
+ [Amazon CLI — 安装版本 2](https://docs.amazonaws.cn/cli/latest/userguide/install-cliv2.html)。
+ [Amazon CLI — 使用快速配置`aws configure`](https://docs.amazonaws.cn/cli/latest/userguide/cli-chap-configure.html)。

## 打开 Apache Airflow UI
<a name="access-airflow-ui-onconsole"></a>

下图显示了 Amazon MWAA 控制台上指向 Apache Airflow UI 的链接。

![\[本图显示了 Amazon MWAA 控制台上指向 Apache Airflow UI 的链接。\]](http://docs.amazonaws.cn/mwaa/latest/userguide/images/mwaa-console-aa-ui.png)


## 登录 Apache Airflow
<a name="airflow-access-and-login"></a>

你需要你的 Amazon Web Services 账户 内部 Amazon Identity and Access Management (IAM) [Apache Airflow 用户界面访问策略：亚马逊 MWAAWeb ServerAccess](access-policies.md#web-ui-access) 权限才能访问你的 Apache Airflow 用户界面。

**要访问 Apache Airflow UI，请执行以下操作**

1. 在 Amazon MWAA 控制台上打开[环境页面](https://console.amazonaws.cn/mwaa/home#/environments)。

1. 选择环境。

1. 选择**打开 Airflow UI**。