All Questions
Dynamodb hard

An application performs a `PutItem` with a `ConditionExpression`. The condition fails (e.g., the item already exists), and the database rejects the write. How many WCUs are consumed?

  1. A 0 WCUs: Since no data was written to the persistent storage.
  2. B The full WCU cost of the payload: DynamoDB must perform the 'Read' and 'Compare' work on the primary node to evaluate your condition. You pay for the compute and IO effort of the evaluation regardless of the outcome.
  3. C 0.5 WCUs fixed fee for the failed check.
  4. D 1 RCU (it is converted to a read charge).

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions