DVA-C02 - Development with AWS Services - Section 1.8

Select Amazon DynamoDB read consistency and capacity modes, and manage throttling, time to live and conditional writes in application code.

Select between strongly consistent and eventually consistent reads in Amazon DynamoDB based on application requirements, and choose between provisioned throughput and on-demand capacity modes to match traffic patterns. Apply time to live for automatic item expiry and use conditional writes to prevent lost updates.

Strongly consistent readsEventually consistent readsOn-demand capacityProvisioned throughput

Practice question for this objective

Free sampleDevelopment with AWS Servicesmedium

A developer reads items of 3 KB each from a DynamoDB table using GetItem. The table is in provisioned capacity mode, and the developer must size read capacity correctly. One requirement allows eventually consistent reads, while a separate latency-sensitive path on the same table needs strongly consistent reads of the same item size. How does the read capacity unit cost differ between the two read types for these items?

  • AAn eventually consistent read of the 3 KB item costs one read unit, and a strongly consistent read of the same item costs two read units, so the eventual read is the cheaper option.
  • BBoth read types cost the same one read unit for the 3 KB item, because read consistency changes only the latency of the response and never the read unit accounting at all.
  • CAn eventually consistent read of the 3 KB item costs half a read unit, and a strongly consistent read of the same item costs one read unit, so the strong read costs twice as much. Correct
  • DAn eventually consistent read of the 3 KB item costs two read units, and a strongly consistent read of the same item costs one read unit, so the strong read is the cheaper option.
Compute that a strongly consistent read costs twice the read units of an eventually consistent read for the same item size. DynamoDB charges one read capacity unit for a strongly consistent read of an item up to 4 KB and half a unit for an eventually consistent read of the same item, so for a 3 KB item the strong read consumes one unit and the eventual read consumes half a unit, making strong reads twice as costly.

Why A is wrong: This doubles both figures, since a strong read of an item up to 4 KB costs one unit and an eventual read costs half a unit, not two units and one unit respectively.

Why B is wrong: Consistency does affect cost here, because an eventual read is billed at half the unit cost of a strong read for the same item, so the two read types are not equal.

Why C is correct: A strong read of an item up to 4 KB costs one whole read unit and an eventual read of the same item costs half a unit, so for this 3 KB item the strong read costs twice the eventual read.

Why D is wrong: This inverts the relationship, since the strong read is the more expensive type at one unit per 4 KB while the eventual read costs only half a unit, not the reverse.

See more DVA-C02 practice questions, answers explained.

More in this domain

Back to all Development with AWS Services objectives, or the DVA-C02 cert hub.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.