Bird
Raised Fist0
DynamoDBquery~20 mins

Reserved capacity in DynamoDB - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Reserved Capacity Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Reserved Capacity Billing

Which statement best describes how reserved capacity affects billing in DynamoDB?

AReserved capacity only applies to on-demand tables and charges per request.
BReserved capacity automatically increases your table's throughput without extra cost.
CReserved capacity allows unlimited storage without additional charges.
DReserved capacity provides a discount by pre-purchasing read and write capacity units for a fixed term.
Attempts:
2 left
💡 Hint

Think about how pre-purchasing capacity units can save money.

❓ query_result
intermediate
2:00remaining
Reserved Capacity Impact on Cost Calculation

Given a DynamoDB table with 100 reserved write capacity units and actual usage of 150 write capacity units in a billing hour, how many write capacity units are billed at the on-demand rate?

A50 write capacity units
B100 write capacity units
C150 write capacity units
D0 write capacity units
Attempts:
2 left
💡 Hint

Reserved capacity covers part of the usage; the rest is billed on-demand.

📝 Syntax
advanced
2:00remaining
Reserved Capacity Purchase CLI Command

Which AWS CLI command correctly purchases reserved capacity for DynamoDB with 200 write capacity units for 1 year?

Aaws dynamodb purchase-reserved-capacity --reserved-capacity-configuration WriteCapacityUnits=200,Duration=1
Baws dynamodb purchase-reserved-capacity-offering --reserved-capacity-offering-id 200 --count 1
Caws dynamodb purchase-reserved-capacity-offering --reserved-capacity-offering-id <offering-id> --count 1
Daws dynamodb buy-reserved-capacity --write-units 200 --term 1
Attempts:
2 left
💡 Hint

You need to specify the offering ID, not just the units.

❓ optimization
advanced
2:00remaining
Optimizing Reserved Capacity Usage

You have multiple DynamoDB tables with varying workloads. How can you optimize reserved capacity purchases to reduce costs?

AUse on-demand capacity mode only to avoid managing reserved capacity.
BPurchase reserved capacity at the account level to share across tables and reduce unused capacity.
CPurchase reserved capacity for each table separately based on its peak usage.
DPurchase reserved capacity only for the largest table and let others use on-demand.
Attempts:
2 left
💡 Hint

Think about sharing capacity across tables to maximize utilization.

🔧 Debug
expert
2:00remaining
Troubleshooting Reserved Capacity Not Applying

You purchased reserved capacity for 300 read units, but your billing shows you are still charged on-demand for all 300 read units. What is the most likely cause?

AThe reserved capacity was purchased in a different AWS region than the table's region.
BReserved capacity only applies to write units, not read units.
CYou must enable reserved capacity on each table manually after purchase.
DReserved capacity applies only to on-demand tables, not provisioned tables.
Attempts:
2 left
💡 Hint

Check if the reserved capacity and table are in the same region.

Practice

(1/5)
1. What is the main benefit of using Reserved Capacity in DynamoDB?
easy
A. It automatically scales the database up and down.
B. It backs up data to another region.
C. It saves money by pre-paying for database capacity.
D. It encrypts data at rest.

Solution

  1. Step 1: Understand Reserved Capacity purpose

    Reserved Capacity allows you to pay upfront for a set amount of database throughput, which reduces costs compared to on-demand pricing.
  2. Step 2: Compare with other options

    Scaling, backup, and encryption are separate features and not related to Reserved Capacity.
  3. Final Answer:

    It saves money by pre-paying for database capacity. -> Option C
  4. Quick Check:

    Reserved Capacity = Cost saving by pre-payment [OK]
Hint: Reserved Capacity means paying upfront to save money [OK]
Common Mistakes:
  • Confusing Reserved Capacity with auto-scaling
  • Thinking it manages backups or encryption
  • Assuming it is a query or API feature
2. Which of the following is the correct way to purchase Reserved Capacity for DynamoDB?
easy
A. Through AWS Management Console or AWS CLI
B. Using a SQL query in DynamoDB console
C. By calling a DynamoDB API operation
D. By enabling a setting in the table properties

Solution

  1. Step 1: Identify how Reserved Capacity is bought

    Reserved Capacity is purchased via the AWS Management Console or AWS CLI, not through database queries or API calls.
  2. Step 2: Eliminate incorrect methods

    SQL queries and table property settings do not handle Reserved Capacity purchases.
  3. Final Answer:

    Through AWS Management Console or AWS CLI -> Option A
  4. Quick Check:

    Reserved Capacity purchase = Console or CLI [OK]
Hint: Buy Reserved Capacity only via AWS Console or CLI [OK]
Common Mistakes:
  • Trying to buy Reserved Capacity with API calls
  • Assuming it can be set in table properties
  • Confusing it with query commands
3. If a company has a steady workload of 1000 read capacity units and 500 write capacity units, which option best describes the cost benefit of Reserved Capacity?
medium
A. Reserved Capacity saves money by pre-paying for steady usage.
B. Reserved Capacity will cost more than on-demand pricing.
C. Reserved Capacity only applies to burst workloads.
D. Reserved Capacity automatically adjusts capacity units.

Solution

  1. Step 1: Understand workload type

    The workload is steady and predictable, which is ideal for Reserved Capacity.
  2. Step 2: Match Reserved Capacity benefits

    Reserved Capacity saves money by pre-paying for steady usage, unlike on-demand which is more expensive for constant loads.
  3. Final Answer:

    Reserved Capacity saves money by pre-paying for steady usage. -> Option A
  4. Quick Check:

    Steady workload + Reserved Capacity = Cost saving [OK]
Hint: Reserved Capacity suits steady workloads to save money [OK]
Common Mistakes:
  • Thinking Reserved Capacity is for bursty or variable workloads
  • Assuming it auto-scales capacity units
  • Believing it costs more than on-demand for steady use
4. A developer tries to buy Reserved Capacity using a DynamoDB API call but gets an error. What is the likely cause?
medium
A. Reserved Capacity requires table to be in on-demand mode.
B. Reserved Capacity cannot be purchased via API calls.
C. The API call syntax is incorrect.
D. Reserved Capacity is only for global tables.

Solution

  1. Step 1: Check how Reserved Capacity is purchased

    Reserved Capacity is bought only through AWS Console or CLI, not through DynamoDB API calls.
  2. Step 2: Understand error cause

    Trying to buy it via API results in error because the API does not support this operation.
  3. Final Answer:

    Reserved Capacity cannot be purchased via API calls. -> Option B
  4. Quick Check:

    Reserved Capacity purchase method = Console/CLI only [OK]
Hint: Reserved Capacity purchase via API causes error [OK]
Common Mistakes:
  • Assuming API calls can buy Reserved Capacity
  • Blaming syntax errors without checking purchase method
  • Confusing Reserved Capacity with table modes
5. A company has unpredictable spikes in traffic but wants to save costs using Reserved Capacity. What is the best approach?
hard
A. Reserved Capacity automatically adjusts to spikes, so buy any amount.
B. Buy Reserved Capacity for the peak traffic to cover all spikes.
C. Use only on-demand capacity to handle spikes efficiently.
D. Buy Reserved Capacity for the average baseline and use on-demand for spikes.

Solution

  1. Step 1: Analyze workload pattern

    The workload has unpredictable spikes, so buying Reserved Capacity for peak would be costly and wasteful.
  2. Step 2: Combine Reserved and on-demand

    Buying Reserved Capacity for the steady baseline and using on-demand for spikes balances cost and flexibility.
  3. Final Answer:

    Buy Reserved Capacity for the average baseline and use on-demand for spikes. -> Option D
  4. Quick Check:

    Baseline Reserved + on-demand spikes = Cost efficient [OK]
Hint: Reserve baseline, use on-demand for spikes to save money [OK]
Common Mistakes:
  • Buying Reserved Capacity for peak traffic wastes money
  • Relying only on on-demand increases cost
  • Thinking Reserved Capacity auto-scales with spikes
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard