0
0
DynamoDBquery~20 mins

On-demand vs provisioned cost comparison in DynamoDB - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DynamoDB Cost Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
Calculate monthly cost for On-demand mode

You have a DynamoDB table in On-demand mode. It receives 1 billion read requests and 500 million write requests per month. Reads cost $1.25 per million and writes cost $1.25 per million. What is the total monthly cost?

A$1,875
B$2,500
C$1,250
D$3,125
Attempts:
2 left
💡 Hint

Calculate cost by multiplying requests by cost per million, then add reads and writes.

query_result
intermediate
2:00remaining
Calculate monthly cost for Provisioned mode with auto scaling

A DynamoDB table is in provisioned mode with 1,500 read capacity units (RCUs) and 300 write capacity units (WCUs). Reads cost $0.00013 per RCU-hour and writes cost $0.00065 per WCU-hour. Calculate the monthly cost assuming 30 days.

A$140.40
B$280.80
C$560.00
D$468.00
Attempts:
2 left
💡 Hint

Calculate hourly cost for reads and writes, then multiply by hours in 30 days (720 hours).

🧠 Conceptual
advanced
1:30remaining
Identify the main cost difference between On-demand and Provisioned modes

Which statement best describes the main cost difference between DynamoDB On-demand and Provisioned capacity modes?

AOn-demand requires capacity planning, Provisioned automatically scales with usage
BOn-demand charges a fixed monthly fee, Provisioned charges per request
COn-demand charges per request, Provisioned charges per capacity unit regardless of usage
DOn-demand is cheaper for high traffic, Provisioned is cheaper for low traffic
Attempts:
2 left
💡 Hint

Think about how billing works for each mode.

📝 Syntax
advanced
1:30remaining
Identify the error in a cost calculation query

Given this SQL-like pseudocode to calculate monthly cost for provisioned mode:
SELECT (RCU * 0.00013 + WCU * 0.00065) * 720 AS monthly_cost FROM table_capacity;
What is the main issue with this query?

DynamoDB
SELECT (RCU * 0.00013 + WCU * 0.00065) * 720 AS monthly_cost FROM table_capacity;
AIt lacks a GROUP BY clause to aggregate multiple rows
BIt assumes 720 hours per month which may not be accurate
CIt does not multiply by the number of days in the month
DIt incorrectly adds RCU and WCU costs before multiplying by hours
Attempts:
2 left
💡 Hint

Consider if the query aggregates multiple rows or not.

optimization
expert
2:00remaining
Optimize cost for a variable traffic DynamoDB table

You manage a DynamoDB table with highly variable traffic: low usage at night and high during the day. Which strategy best optimizes cost while ensuring performance?

AUse On-demand mode to pay only for requests made
BUse Provisioned mode with fixed capacity to avoid scaling delays
CUse On-demand mode with reserved capacity units for peak hours
DUse Provisioned mode with auto scaling to adjust capacity dynamically
Attempts:
2 left
💡 Hint

Think about balancing cost and performance with changing traffic.