

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

# 使用 AWS Cost Explorer 成本管理服务为 Amazon EMR 集群创建详细的成本和使用情况报告
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer"></a>

*Parijat Bhide 和 Aromal Raj Jayarajan，Amazon Web Services*

## Summary
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer-summary"></a>

此模式显示如何通过配置[用户定义的成本分配标签](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/custom-tags.html)来跟踪 Amazon EMR 集群的使用成本。您可以使用这些标签在 AWS Cost Explorer 成本管理服务中为跨多个维度的集群创建详细的成本和使用情况报告。例如，您可以在团队、项目或成本中心级别跟踪使用成本。

## 先决条件和限制
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer-prereqs"></a>

**先决条件**
+ 一个有效的 Amazon Web Services account
+ 一个或多个已激活用户自定义标签的 [EMR 集群](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-gs.html)

## 架构
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer-architecture"></a>

**目标技术堆栈**
+ Amazon EMR
+ AWS Cost Explorer 成本管理服务

**目标架构**

下图显示了如何应用标签来跟踪特定 Amazon EMR 集群的使用成本。

![\[使用 Amazon EMR 集群的成本分配标签。\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/images/pattern-img/3e470077-e3b1-43cf-8cb9-0895fe39e664/images/fb6b78cb-47bb-4ba1-848a-98dba02bdbb2.png)


下图显示了如下工作流：

1. 数据工程师或 AWS 管理员为 Amazon EMR 集群创建用户定义的成本分配标签。

1. AWS 管理员激活标签。

1. 标签将元数据报告给 AWS Cost Explorer 成本管理服务。

## 工具
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer-tools"></a>

**工具**
+ [Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html) 是一个托管集群平台，可简化在 AWS 上运行大数据框架以处理和分析海量数据的操作。
+ [AWS Cost Explorer 成本管理服务](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-what-is.html)可助您您查看和分析成本与使用情况。

## 操作说明
<a name="create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer-epics"></a>

### 为您的 Amazon EMR 集群创建和激活标签
<a name="create-and-activate-tags-for-your-amazon-emr-clusters"></a>


| Task | 说明 | 所需技能 | 
| --- | --- | --- | 
| 为您的 Amazon EMR 集群创建用户定义的成本分配标签。 | **向现有 Amazon EMR 集群添加标签**按照 *Amazon EMR 管理指南*中的[向现有集群添加标签](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags-add.html)中的说明操作。**向新的 Amazon EMR 集群添加标签**按照 *Amazon EMR 管理指南*中的[向新集群添加标签](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags-add-new.html)中的说明操作。有关如何设置 Amazon EMR 集群的更多信息，请参阅 *Amazon EMR 管理指南*中的[计划和配置集群](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan.html)。 | 数据工程师 | 
| 激活用户定义的成本分配标签。 | 按照 *Amazon Web Services Billing 用户指南*中的[激活用户定义的成本分配标签](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/activating-tags.html)中的说明操作。 | AWS 管理员 | 

### 为您的 Amazon EMR 集群创建成本和使用情况报告
<a name="create-cost-and-usage-reports-for-your-amazon-emr-clusters"></a>


| Task | 说明 | 所需技能 | 
| --- | --- | --- | 
| 使用 AWS Cost Explorer 成本管理服务中的标签筛选条件为您的 Amazon EMR 集群创建成本和使用情况报告。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/create-detailed-cost-and-usage-reports-for-amazon-emr-clusters-by-using-aws-cost-explorer.html)有关更多信息，请参阅 *AWS Cost Management 用户指南*中的[使用 Cost Explorer 浏览数据](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-exploring-data.html)。 | 常规 AWS、AWS 管理员 | 