Let’s Get Certified
Module 04 / 13 · Development with AWS services

Match storage to an access pattern

Choose keys, consistency, caching and retention from how an application actually reads and writes.

Match storage to an access pattern

Write the exact lookup before defining a DynamoDB key. A query needs one partition-key value and can constrain sort keys. Filtering after a scan still consumes read capacity for evaluated items. Use a condition expression for a write that must succeed only once. Strong reads are an option on a base table when the caller must see a completed write. Global secondary indexes support eventually consistent reads.

Store large objects in S3 and keep the object key in a record when appropriate. For a relational transaction across related rows, evaluate a relational engine and connection management. A cache needs an invalidation policy. TTL removes expired items asynchronously, so a time-sensitive reader must check the timestamp itself. S3 Lifecycle can transition older objects into a storage class suited to their retrieval needs.

Worked case

A table stores orders by customer ID and order timestamp. The application scans all rows to find last month’s orders for one customer. What narrower read is possible?

Check your reasoning

Query that customer’s partition, with a sort-key range for the month. Compare consumed capacity and ensure pagination still returns the complete month.

Second worked case

A user requests the latest account balance while a dashboard tolerates one minute of lag. Should they share a cache policy?

Check your reasoning

Specify freshness per read. Retrieve the current balance with the required consistency from a suitable store. A dashboard can use a bounded cache. DynamoDB Accelerator can accelerate eligible eventually consistent reads, while S3 Lifecycle governs object tier transitions.

DynamoDB read consistency · Official DVA-C03 objectives for this domain

Related lesson in AWS Certified Solutions Architect – Associate. Choose a database from its busiest queries.

Practice with the recording

An application reads orders by customer ID and date but writes arrive mostly from one customer. What should the DynamoDB design test?

Check your reasoning

Describe the access pattern as a partition key and sort-key range, then test the busiest key with representative data. A query can be efficient and still concentrate traffic. Check capacity and throttling on both the base table and any index the request uses.

Cert Espresso · DVA-C03 full course · 1:09:05

Practice the individual exam skills
  • 1.3.1–1.3.4 For a session, an invoice and a large attachment, choose a store, retention rule and read-consistency requirement. Check how a stale cache affects each. For the invoice table, compare the cost and returned data of a key query with a full scan.
Knowledge check

Match storage to an access pattern quiz

Answer 3 questions. Check each answer for an explanation.