
Ultimate access to all questions.
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.