A multi-tenant SaaS uses shared Amazon DynamoDB tables and AWS Lambda for its application layer. Each request includes a tenant ID. The company wants to bill tenants based on their individual DynamoDB resource consumption and already has an AWS Cost and Usage Report (CUR). Which approach provides a granular per-tenant view of DynamoDB costs with the least operational overhead?
Choose an answer
Tap an option to check your answer.
Correct answer: Modify Lambda to log each transaction's tenant ID and the RCUs and WCUs consumed from DynamoDB to CloudWatch Logs. Deploy another Lambda to calculate tenant costs by using the logged capacity units and the overall DynamoDB cost from the AWS Cost Explorer API. Use an Amazon EventBridge rule to run the cost-calculation Lambda on a schedule..
Why this is the answer
The correct approach leverages detailed per-transaction logging and programmatic cost calculation. By logging the tenant ID and consumed RCUs/WCUs for each DynamoDB interaction, you capture the granular data needed for accurate attribution. A separate Lambda can then process these logs, correlate them with the overall DynamoDB cost obtained from the AWS Cost Explorer API, and calculate per-tenant costs. This method provides high accuracy because it directly measures resource consumption per tenant. An EventBridge rule automates this process, minimizing operational overhead compared to manual analysis. Incorrect options: Tagging DynamoDB tables with tenant IDs is not feasible for shared tables; tags apply to the entire table, not individual items or transactions. Using a new per-tenant partition key for cost attribution is indirect and doesn't directly measure consumed capacity units, making cost allocation less precise. Athena queries on item usage alone won't provide RCU/WCU consumption. Publishing custom metrics to CloudWatch and using CloudWatch Logs Insights for queries is a good monitoring strategy, but combining this with the AWS Pricing Calculator for overall costs is not dynamic or accurate enough for granular, real-time cost allocation based on actual usage. The pricing calculator provides estimates, not actual billing data.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed