

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 成本元件
<a name="cost-component"></a>

 **AWS 成本元件上的工作負載探索** 

![工作負載探索成本元件](http://docs.aws.amazon.com/zh_tw/solutions/latest/workload-discovery-on-aws/images/workload-discovery-cost-component.png)


您可以在 AWS [Billing and Cost Management and Cost Management 中建立 AWS](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html) CUR。這會將 [Parquet](https://cwiki.apache.org/confluence/display/Hive/Parquet) 格式的檔案發佈至 `CostAndUsageReportBucket` Amazon S3 儲存貯體。Web UI 向叫用 Cost Lambda 函數的 AWS AppSync 端點提出請求。函數會將預先定義的查詢傳送至 Amazon Athena，從 AWS CUR 傳回預估成本資訊。

由於 AWS CUR 的大小，來自 Amazon Athena 的回應可能會非常大。解決方案會將結果存放在 `AthenaResultsBucket` Amazon S3 儲存貯體中，並將結果分頁回 Web UI。在此儲存貯體上設定的[生命週期](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)政策會移除超過七天的項目。