0
0
DynamoDBquery~20 mins

DAX (DynamoDB Accelerator) caching - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DAX Caching Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does DAX improve DynamoDB read performance?

DAX is a caching service for DynamoDB. Which of the following best explains how DAX improves read performance?

ADAX stores frequently accessed data in memory close to the application, reducing read latency by avoiding repeated calls to DynamoDB.
BDAX compresses data stored in DynamoDB tables to reduce storage size and speed up reads.
CDAX automatically indexes all DynamoDB tables to speed up query operations.
DDAX duplicates DynamoDB tables in another region to improve read speed.
Attempts:
2 left
💡 Hint

Think about what caching means and how it helps with repeated data access.

query_result
intermediate
2:00remaining
What is the output of a DAX cache hit?

Assume a DynamoDB table has an item with key 'UserID' = 123 and attribute 'Name' = 'Alice'. A DAX client queries for this item twice in a row. What happens on the second query?

AThe second query returns a partial item missing some attributes.
BThe second query returns the item from DAX cache instantly without calling DynamoDB.
CThe second query returns an error because DAX only caches writes.
DThe second query always calls DynamoDB again to ensure fresh data.
Attempts:
2 left
💡 Hint

Think about what a cache hit means in caching systems.

📝 Syntax
advanced
2:00remaining
Identify the correct way to initialize a DAX client in Python

Which of the following Python code snippets correctly initializes a DAX client to connect to a DAX cluster endpoint?

DynamoDB
from amazon_dax import AmazonDaxClient

# Choose the correct initialization
Aclient = AmazonDaxClient('dax-cluster.example.com:8111')
Bclient = AmazonDaxClient(endpoint_url='dax-cluster.example.com:8111')
Cclient = AmazonDaxClient(url='dax-cluster.example.com:8111')
Dclient = AmazonDaxClient(endpoints=['dax-cluster.example.com:8111'])
Attempts:
2 left
💡 Hint

Check the official parameter name for the DAX client constructor.

optimization
advanced
2:00remaining
How to reduce stale data risk when using DAX caching?

DAX caches data to improve read speed, but cached data can become stale if the underlying DynamoDB table changes. Which strategy best reduces the risk of stale data?

AManually clear the entire DAX cache every hour regardless of data changes.
BDisable DAX caching for all read operations to always get fresh data.
CConfigure DAX with a short TTL (time-to-live) so cached items expire quickly and refresh from DynamoDB often.
DUse DAX only for write operations and never for reads.
Attempts:
2 left
💡 Hint

Think about how caching systems handle data freshness with expiration times.

🔧 Debug
expert
3:00remaining
Why does this DAX query sometimes return outdated data?

An application uses DAX caching for a DynamoDB table. After updating an item in DynamoDB directly (not through DAX), subsequent reads via DAX sometimes return old data. What is the most likely cause?

ADAX cache is not automatically invalidated when DynamoDB is updated outside DAX, causing stale reads until cache expires.
BDAX does not support caching for tables with more than 1000 items.
CThe application is using the wrong partition key in queries, causing inconsistent results.
DDAX requires manual cache refresh commands after every write to DynamoDB.
Attempts:
2 left
💡 Hint

Consider how DAX cache invalidation works when updates bypass DAX.