
Answer-first summary for fast verification
Answer: Tag each DynamoDB table with a tenant ID, enable this tag as a cost allocation tag in AWS Billing and Cost Management, modify Lambda functions to log tenant IDs in Amazon CloudWatch Logs, and use the AWS CUR to analyze DynamoDB costs per tenant ID.
Option A is correct because it provides a straightforward way to allocate DynamoDB costs per tenant with minimal operational effort. By tagging each table with the tenant ID and enabling this tag as a cost allocation tag in the AWS Billing and Cost Management console, the company can immediately distinguish costs associated with each tenant. This approach leverages existing AWS capabilities like cost allocation tags and the AWS Cost and Usage Report (CUR), removing the need for additional log processing or custom calculations. While other options involve more complex setups and additional Lambda functions or custom metrics, Option A offers the most efficient and automated way to achieve the desired granularity in cost allocation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A SaaS company has developed a multi-tenant environment using shared Amazon DynamoDB tables and AWS Lambda functions for application services. They aim to implement a tiered subscription model based on resource consumption per tenant, identified by a unique tenant ID in each Lambda request. The company has an AWS Cost and Usage Report (CUR) in their AWS account and seeks to allocate DynamoDB costs accurately to each tenant. What solution offers the most granular view of DynamoDB costs per tenant with minimal operational effort?
A
Tag each DynamoDB table with a tenant ID, enable this tag as a cost allocation tag in AWS Billing and Cost Management, modify Lambda functions to log tenant IDs in Amazon CloudWatch Logs, and use the AWS CUR to analyze DynamoDB costs per tenant ID.
B
Log tenant IDs and consumed RCUs/WCUs from DynamoDB in Amazon CloudWatch Logs via Lambda functions, deploy a Lambda function to compute tenant costs using logged capacity units and overall DynamoDB costs from the AWS Cost Explorer API, and schedule this function with an Amazon EventBridge rule.
C
Add a partition key to DynamoDB items linking them to individual tenants, update Lambda functions to fill this new column during transactions, use another Lambda function and Amazon Athena to calculate tenant costs based on the number of tenant items and overall DynamoDB costs from the AWS CUR, and automate this process with an Amazon EventBridge rule.
D
Log tenant IDs, response sizes, and transaction durations as custom metrics in Amazon CloudWatch Logs via a Lambda function, query these metrics per tenant using CloudWatch Logs Insights, and calculate tenant costs using the AWS Pricing Calculator for overall DynamoDB costs.