The database section of DEA-C01 is long, and it's heavy on DynamoDB and Redshift. These are my condensed notes.
DynamoDB
A serverless NoSQL key-value store. Items max out at 400 KB. The primary key is either a partition key, or a partition key + sort key. Pick a high-cardinality partition key: movie_id spreads load well, while movie_language would put most traffic on "English".
The capacity math (it will be on the exam)
- 1 WCU = one write per second of up to 1 KB.
- 1 RCU = one strongly consistent read, or two eventually consistent reads, per second of up to 4 KB.
- Always round the item size up first.
| Scenario | Answer |
|---|---|
| 6 writes/s of 4.5 KB | 6 × 5 = 30 WCU |
| 16 eventually consistent reads/s of 12 KB | 16/2 × 3 = 24 RCU |
| 10 strongly consistent reads/s of 6 KB | 10 × 2 = 20 RCU |
On-Demand mode needs no planning and never throttles, but costs about 2.5x provisioned. Provisioned mode throttles hot keys with ProvisionedThroughputExceededException. The fixes are backoff, a better key, or DAX.
Indexes, cache, streams, TTL
- LSI: same partition key, different sort key. Only at table creation, max 5, shares table capacity.
- GSI: a completely new key, added any time, with its own capacity. A throttled GSI throttles writes to the base table, which is a favourite exam trap.
- DAX: in-memory cache, microsecond reads, same API, no code changes.
-
Streams: 24-hour change log. Lambda reads it through an event source mapping. The
NEW_AND_OLD_IMAGESview gives you before/after for CDC. - TTL: set a Number attribute holding an epoch timestamp, and items expire for free (within a few days).
A pattern I'll actually reuse:
S3 upload ──► Lambda ──► DynamoDB (object metadata) ──► query "all files for customer X uploaded last week"
RDS and Aurora
RDS shows up on the exam mostly as what not to use for big data, or as a source for Redshift. Know ACID, and know shared (FOR SHARE) vs. exclusive (FOR UPDATE) locks.
Aurora keeps 6 copies across 3 AZs, has up to 15 read replicas behind a reader endpoint, fails over in under 30 seconds, and can rewind with Backtrack. Storage now grows to 256 TiB on supported versions. With pgvector it doubles as a vector store for small RAG systems.
Picking a purpose-built database
| Clue in the question | Answer |
|---|---|
| MongoDB / JSON documents | DocumentDB |
| Cassandra / CQL | Keyspaces |
| Relationships, social graph, fraud rings | Neptune (Gremlin, openCypher, SPARQL) |
| IoT metrics over time | Timestream |
| Durable Redis | MemoryDB |
Redshift: the big one
A columnar, MPP data warehouse for OLAP. A leader node plans queries, and compute nodes (split into slices) run them.
Distribution styles
- KEY: large fact tables joined on that column.
- ALL: small dimension tables.
- EVEN: no obvious join key.
- AUTO: let Redshift decide.
Getting data in and out
COPY sales
FROM 's3://my-bucket/sales/'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftLoad'
FORMAT AS PARQUET;
UNLOAD ('SELECT * FROM sales WHERE year = 2025')
TO 's3://my-bucket/export/sales_'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftLoad'
FORMAT AS PARQUET;
There are also auto-copy from S3, zero-ETL from Aurora, and streaming ingestion from Kinesis or MSK. For narrow tables, load in a single COPY.
Query data where it lives
- Spectrum: query S3 without loading it.
- Federated queries: read live RDS/Aurora data (read-only; credentials in Secrets Manager).
- Data sharing: live, read-only access across clusters, accounts and Regions (RA3 + encryption required).
Keeping it fast
- WLM queues: automatic (up to 8) or manual with queue hopping.
- Concurrency scaling: extra capacity for read bursts.
- Short Query Acceleration: ML routes short queries past long ones.
-
Materialized views: precomputed dashboard queries, with
AUTO REFRESH. -
VACUUM:
DELETE ONLYreclaims space,SORT ONLYre-sorts without reclaiming.
Resizing: elastic resize takes minutes. Classic resize can leave the cluster read-only for hours or days, so snapshot, restore and resize the copy instead.
Serverless: billed in RPUs (base 32–512), VPC-only, no WLM or parameter groups.
Extending it: Lambda UDFs call any code from SQL. The Data API runs SQL over HTTPS, asynchronously, with no drivers. It's great from Lambda or Step Functions.
Anti-patterns: small data or OLTP (use RDS/DynamoDB), unstructured data or BLOBs (use S3).
Key takeaways
- Round up item sizes, then compute WCU/RCU. Eventually consistent reads cost half.
- GSIs can throttle your table. LSIs are creation-time only.
- Aurora = 6 copies / 3 AZs / 15 replicas.
- Redshift: KEY vs. ALL distribution, COPY/UNLOAD, Spectrum vs. federated vs. data sharing, concurrency scaling vs. SQA.
Next: Migration and Transfer, covering DMS, DataSync, Snow Family, Transfer Family and Data Exchange.
Top comments (0)