SAP-C02 第 416 题
题目
A software as a service (SaaS) company has developed a multi-tenant environment. The company uses Amazon DynamoDB tables that the tenants share for the storage layer. The company uses AWS Lambda functions for the application services. The company wants to offer a tiered subscription model that is based on resource consumption by each tenant. Each tenant is identified by a unique tenant ID that is sent as part of each request to the Lambda functions. The company has created an AWS Cost and Usage Report (AWS CUR) in an AWS account. The company wants to allocate the DynamoDB costs to each tenant to match that tenant's resource consumption. Which solution will provide a granular view of the DynamoDB cost for each tenant with the LEAST operational effort?
中文翻译:
一家软件即服务 (SaaS) 公司开发了多租户环境。该公司使用租户共享的 Amazon DynamoDB 表作为存储层。该公司使用 AWS Lambda 函数来提供应用程序服务。该公司希望提供基于每个租户的资源消耗的分层订阅模型。每个租户都由唯一的租户 ID 进行标识,该 ID 作为每个请求的一部分发送到 Lambda 函数。该公司已在 AWS 账户中创建了 AWS 成本和使用情况报告 (AWS CUR)。该公司希望将 DynamoDB 成本分配给每个租户,以匹配该租户的资源消耗。哪种解决方案能够以最少的运营工作量提供每个租户 DynamoDB 成本的精细视图?
选项
A. Associate a new tag that is named tenant ID with each table in DynamoDB. Activate the tag as a cost allocation tag in the AWS Billing and Cost Management console. Deploy new Lambda function code to log the tenant ID in Amazon CloudWatch Logs. Use the AWS CUR to separate DynamoDB consumption cost for each tenant ID.
中文翻译:
将名为租户 ID 的新标签与 DynamoDB 中的每个表相关联。在 AWS Billing and Cost Management 控制台中激活该标签作为成本分配标签。部署新的 Lambda 函数代码以在 Amazon CloudWatch Logs 中记录租户 ID。使用 AWS CUR 来区分每个租户 ID 的 DynamoDB 消耗成本。
B. Configure the Lambda functions to log the tenant ID and the number of RCUs and WCUs consumed from DynamoDB for each transaction to Amazon CloudWatch Logs. Deploy another Lambda function to calculate the tenant costs by using the logged capacity units and the overall DynamoDB cost from the AWS Cost Explorer API. Create an Amazon EventBridge rule to invoke the calculation Lambda function on a schedule.
中文翻译:
配置 Lambda 函数以将租户 ID 以及每笔事务从 DynamoDB 消耗的 RCU 和 WCU 数量记录到 Amazon CloudWatch Logs。部署另一个 Lambda 函数,通过使用记录的容量单位和来自 AWS Cost Explorer API 的总体 DynamoDB 成本来计算租户成本。创建 Amazon EventBridge 规则以按计划调用计算 Lambda 函数。
C. Create a new partition key that associates DynamoDB items with individual tenants. Deploy a Lambda function to populate the new column as part of each transaction. Deploy another Lambda function to calculate the tenant costs by using Amazon Athena to calculate the number of tenant items from DynamoDB and the overall DynamoDB cost from the AWS CUR. Create an Amazon EventBridge rule to invoke the calculation Lambda function on a schedule.
中文翻译:
创建将 DynamoDB 项目与各个租户关联的新分区键。部署 Lambda 函数以填充新列作为每个事务的一部分。部署另一个 Lambda 函数来计算租户成本,方法是使用 Amazon Athena 计算来自 DynamoDB 的租户项目数量以及来自 AWS CUR 的总体 DynamoDB 成本。创建 Amazon EventBridge 规则以按计划调用计算 Lambda 函数。
D. Deploy a Lambda function to log the tenant ID, the size of each response, and the duration of the transaction call as custom metrics to Amazon CloudWatch Logs. Use CloudWatch Logs Insights to query the custom metrics for each tenant. Use AWS Pricing Calculator to obtain the overall DynamoDB costs and to calculate the tenant costs.
中文翻译:
部署 Lambda 函数以将租户 ID、每个响应的大小以及事务调用的持续时间作为自定义指标记录到 Amazon CloudWatch Logs。使用 CloudWatch Logs Insights 查询每个租户的自定义指标。使用 AWS 定价计算器获取 DynamoDB 总体成本并计算租户成本。
答案
B
解析
正确答案:B 解析: 本题应选择 B。 正确选项: B. 配置 Lambda 函数以将租户 ID 以及每笔事务从 DynamoDB 消耗的 RCU 和 WCU 数量记录到 Amazon CloudWatch Logs。部署另一个 Lambda 函数,通过使用记录的容量单位和来自 AWS Cost Explorer API 的总体 DynamoDB 成本来计算租户成本。创建 Amazon EventBridge 规则以按计划调用计算 La...