AWS Certified Developer Associate DVA-C02 Practice Question
Your application ingests thousands of events each second from 50 IoT devices. Each event record contains deviceId, eventType, eventTimestamp, and payload. The DynamoDB table uses deviceId as the partition key and eventTimestamp as the sort key, but device D-001 generates over 1,000 writes per second, triggering hot-partition throttling. Which partition-key strategy will distribute write load while still letting you query all events for a given device?
Create a GSI on eventType but leave the primary key unchanged.
Keep deviceId as the partition key and eventTimestamp as the sort key.
Concatenate a hashed or random two-digit suffix (for example, deviceId#07) to the deviceId and use that string as the partition key; keep eventTimestamp as the sort key.
Use eventTimestamp as the partition key and deviceId as the sort key.
Adding a calculated suffix to the deviceId expands the partition-key space, giving each write one of many possible partition-key values (deviceId#00-#99, for example). This raises cardinality far beyond 50 devices and spreads the write traffic across multiple physical partitions. Because the suffix is deterministic (hash of timestamp or eventId), the application can still compute the exact key value when it needs to query all events for a particular device and time range. Leaving the keys unchanged or simply swapping them would keep hot partitions, and a GSI on eventType does not change the write distribution for the base table.
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.
What is a partition key?
Open an interactive chat with Bash
What are 'hot partitions' in databases?
Open an interactive chat with Bash
Why is combining unique identifiers and timestamps effective as a partition key?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
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 .