AWS Certified Data Engineer Associate DEA-C01 Practice Question
An ecommerce app logs each shopping cart change in a DynamoDB table. The solution must quickly query all changes for a single shopper in newest-to-oldest order, absorb unpredictable flash-sale traffic without capacity planning, and automatically delete items older than seven days. Which table design and configuration meet these goals with minimal operational effort?
Create a table with partition key shopperId and sort key changeTimestamp, add a local secondary index that reverses the timestamp order, enable TTL, and use provisioned capacity with auto scaling.
Combine shopperId and changeTimestamp into a single primary key attribute, add a global secondary index on shopperId, enable TTL, and keep the table in on-demand capacity mode.
Create a single table with partition key shopperId and sort key changeTimestamp, enable TTL on an expiration attribute set to 7 days, and run the table in on-demand capacity mode.
Create a table with partition key changeTimestamp and sort key shopperId, process a DynamoDB Stream with a Lambda function to delete stale items, and use provisioned capacity with auto scaling.
Using shopperId as the partition key and changeTimestamp as the sort key lets the application issue a single Query and, by setting ScanIndexForward to false, receive results in descending order. Enabling TTL on an attribute with a Unix-epoch value seven days in the future causes DynamoDB to purge expired items automatically. Running the table in on-demand capacity mode allows it to scale instantly for traffic spikes and contract afterward, eliminating provisioning and auto-scaling administration. Alternatives either force inefficient scans or extra indexes, require custom delete logic, or rely on provisioned capacity that needs tuning.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is on-demand capacity mode preferred in this solution?
Open an interactive chat with Bash
What is TTL in DynamoDB and how does it help manage data storage?
Open an interactive chat with Bash
Why use shopperId as the partition key and changeTimestamp as the sort key?
Open an interactive chat with Bash
How does DynamoDB's TTL automatically delete items?
Open an interactive chat with Bash
What is on-demand capacity mode in DynamoDB?
Open an interactive chat with Bash
Why use shopperId as the partition key and changeTimestamp as the sort key?
Open an interactive chat with Bash
AWS Certified Data Engineer Associate DEA-C01
Data Store Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .