SAA-C03 ยท High-performing databases and caching
DynamoDB keys, capacity modes, indexes and global tables
Partition and sort keys, on-demand versus provisioned capacity (RCU and WCU), secondary indexes and global tables for multi-Region access.
Key points
- Primary key: partition (+ sort) key; many distinct, evenly used values.
- On-demand (PAY_PER_REQUEST): unpredictable traffic; provisioned + auto scaling: steady.
- 1 RCU: one strongly consistent (or two eventually consistent) read/s up to 4 KB; 1 WCU: one write/s up to 1 KB.
- GSI: other key, added anytime, eventually consistent; LSI: same partition key, at creation, strong reads.
- Global tables: every Region's replica reads and writes.
Source: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html
Practice questions
In DynamoDB provisioned mode, one write capacity unit (WCU) covers one write per second of an item up to what size?
- 4 KB
- 8 KB
- 1 KB
- 64 KB
Show answer
Answer: C. 1 KB
A WCU covers one write per second for an item up to 1 KB; larger items consume more units. The 4 KB figure belongs to read capacity units, not writes.
Which statements correctly compare DynamoDB global secondary indexes (GSI) and local secondary indexes (LSI)?
- Reads on a GSI consume the base table's read capacity
- An LSI must be created at the same time as the table
- Queries on a GSI support eventual consistency only
- A GSI can use a partition key different from the table's
- An LSI can be added to an existing table at any time
Show answer
Answer: B. An LSI must be created at the same time as the table, C. Queries on a GSI support eventual consistency only, D. A GSI can use a partition key different from the table's
An LSI must be defined when the table is created, GSI queries are eventually consistent only, and a GSI can use a partition key different from the table's. An LSI cannot be added to an existing table, and GSI reads draw on the index's own capacity, not the base table's.
In a DynamoDB global table, only one Region's replica accepts writes; the replicas in the other Regions are read-only.
Show answer
Answer: False
False. Global tables are multi-active: every replica can serve both reads and writes, and changes are replicated between Regions. This is what lets an app write locally in each Region and shift traffic if a Region has problems.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
