Choosing an AWS Data Store: Redshift, DynamoDB, Aurora, S3, and MemoryDB
Choosing a data store on AWS starts from the access pattern, not the service list: analytical scans across billions of rows point to Amazon Redshift or Amazon S3 with Athena, transactional row-level reads and writes point to Amazon RDS or Aurora, single-digit-millisecond key/value lookups at any scale point to DynamoDB, microsecond in-memory access points to Amazon MemoryDB, and retained event streams point to Kinesis Data Streams or Amazon MSK. DEA-C01 Task 2.1 tests whether you can make that call under cost and performance constraints, then configure the chosen store correctly — Redshift distribution and sort keys, DynamoDB capacity modes, Aurora PostgreSQL HNSW vector indexes. It also tests the surrounding machinery: reaching data you have not loaded through Redshift Spectrum, federated queries, and materialized views; landing partner files with AWS Transfer Family; managing table and row locks; and running Apache Iceberg open tables on S3. This lesson covers each skill with the trade-offs the exam rewards.
On this page8 sections
- Match the data store to the access pattern
- Amazon Redshift: configuring the warehouse for cost and performance
- Reaching data you didn't load: Spectrum, federated queries, and materialized views
- OLTP and key/value stores: RDS, Aurora, and DynamoDB
- In-memory and vector workloads: MemoryDB, HNSW on Aurora, and IVF
- Streams as storage, EMR, and Lake Formation
- Open table formats: Apache Iceberg on S3
- Managing locks, and landing files with AWS Transfer Family
- Select the appropriate storage service for a given cost, performance, and access-pattern requirement
- Configure Amazon Redshift distribution styles, sort keys, and RA3 or Serverless deployment for analytical workloads
- Query data in place with Redshift Spectrum, federated queries, and materialized views instead of moving it
- Apply DynamoDB, RDS, Aurora, and MemoryDB to the use cases each is built for, including HNSW vector search on Aurora PostgreSQL
- Diagnose and resolve blocking locks in Amazon Redshift and Amazon RDS
- Manage Apache Iceberg open tables on S3 and integrate AWS Transfer Family file drops into pipelines
Match the data store to the access pattern
You choose a data store by matching four things — access pattern, latency requirement, data volume, and cost model — against what each engine is built for, and DEA-C01 questions almost always hide the answer in the access-pattern wording. "Complex aggregations across years of data" means columnar analytics; "look up a session by ID in milliseconds" means key/value; "query files ad hoc without loading them" means S3 in place.
| Access pattern in the question | Best-fit store | Why |
|---|---|---|
| Complex SQL aggregations, joins, BI dashboards over structured data | Amazon Redshift | Columnar MPP warehouse; scans and aggregates at petabyte scale |
| Transactional (OLTP) row-level reads/writes, relational integrity, joins on normalized schemas | Amazon RDS / Aurora | Row-oriented relational engines with ACID transactions |
| Key/value or document lookups by known key, millisecond latency at any scale | Amazon DynamoDB | Partitioned NoSQL; performance independent of table size |
| Ad hoc or infrequent SQL over files in a data lake; pay only when you query | Amazon S3 + Athena | Cheapest storage; serverless per-query pricing; no cluster to run |
| Microsecond reads, sub-millisecond writes, durable in-memory primary store | Amazon MemoryDB | Valkey/Redis-compatible in-memory database with Multi-AZ durability |
| Ordered, replayable event streams retained for hours to days | Kinesis Data Streams / Amazon MSK | Stream storage with retention and multiple independent consumers |
Two exam heuristics. First, cost questions favor S3 + Athena for data queried occasionally — a running Redshift cluster for a weekly report is the classic wrong answer. Second, performance questions favor purpose-built stores: forcing key/value lookups through a relational database, or analytics through DynamoDB scans, is always the trap option.
Amazon Redshift: configuring the warehouse for cost and performance
Amazon Redshift performs best when you configure how data is distributed and ordered across the cluster, because it is a massively parallel (MPP) columnar warehouse — every query runs across all compute slices, and data placement decides how much network shuffling a join requires.
Distribution style controls which node stores each row. KEY distribution co-locates rows that share a join column, so joining two large tables on their common distribution key avoids redistributing data at query time. ALL copies the entire table to every node — right for small, frequently joined dimension tables. EVEN spreads rows round-robin when no clear join key exists. AUTO (the default) lets Redshift pick and adapt as the table grows; it is the least-operational-overhead answer unless the question describes a specific large-table join to optimize.
Sort keys order rows on disk so range-restricted scans skip blocks. Sort on the column queries filter by most — typically the date or timestamp column in time-series fact tables. Compound sort keys favor queries that filter on the leading column; AUTO sort keys let Redshift choose from observed workload.
Deployment shape drives cost. RA3 nodes decouple compute from Redshift Managed Storage, so you scale compute without paying for storage-driven node counts, and they enable data sharing — live, read-only access to another cluster's data with no copying. Redshift Serverless bills only while queries run, making it the cost answer for intermittent or unpredictable analytics. Concurrency scaling adds transient capacity when queues build during peak dashboard hours, and short query acceleration keeps small queries from waiting behind long ones.
Reaching data you didn't load: Spectrum, federated queries, and materialized views
Redshift can query data it has never loaded, and the exam expects you to pick the right remote-access method for where the data lives.
Redshift Spectrum queries files in Amazon S3 through external tables defined in an external schema (backed by the AWS Glue Data Catalog). Spectrum scales its own fleet independently of your cluster and charges by data scanned, so it suits huge, infrequently queried history: keep hot recent data in local Redshift tables, leave cold years in S3 as Parquet, and one SQL statement joins both. Partitioning and columnar formats cut the bytes scanned and therefore the cost.
Federated queries reach live operational data in Amazon RDS and Aurora (PostgreSQL and MySQL) without any ETL. Redshift connects to the database (credentials from AWS Secrets Manager), pushes down what predicates it can, and lets you join live transactional rows against warehouse history — the answer when the question says "query current orders in Aurora from Redshift without moving data."
Materialized views precompute and store a query result inside Redshift, refreshed incrementally where possible (and on a schedule or automatically). Automatic query rewriting silently redirects eligible dashboard queries to the materialized view. They are the answer when the same expensive aggregation runs repeatedly and freshness within a refresh interval is acceptable.
Scenario
A retailer keeps 90 days of orders in Redshift, seven years of order history as partitioned Parquet in S3, and live inventory in Aurora PostgreSQL. Nightly finance queries need all three. Exam-correct design: local tables for the hot 90 days, a Spectrum external schema over the S3 history, a federated schema to Aurora for live inventory — one warehouse query, nothing copied, and a materialized view over the recurring aggregation to keep the dashboard fast.
OLTP and key/value stores: RDS, Aurora, and DynamoDB
Operational stores are configured around their access patterns, and DEA-C01 tests the configuration choices, not just the service names.
Amazon RDS runs managed relational engines (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2) with automated backups, patching, and Multi-AZ standby failover. Amazon Aurora is the AWS-built MySQL- and PostgreSQL-compatible option with a distributed storage layer that replicates six ways across three Availability Zones, up to 15 low-lag read replicas behind a reader endpoint, and Aurora Serverless v2, which scales capacity in fine-grained increments for spiky or intermittent relational workloads. Configure for the access pattern: read-heavy reporting against an OLTP database gets read replicas, not a bigger writer; connection storms from Lambda get RDS Proxy.
DynamoDB delivers consistent single-digit-millisecond performance regardless of table size, but only if you design for it. The partition key must distribute traffic evenly — a hot key throttles no matter how much capacity you buy. Choose on-demand capacity for unpredictable or spiky traffic (pay per request, zero capacity management) and provisioned capacity (with auto scaling) for steady, forecastable traffic where it is cheaper. Global secondary indexes serve alternate access patterns; DynamoDB Accelerator (DAX) caches microsecond reads for read-heavy, read-mostly workloads; TTL expires items automatically.
The dividing line the exam draws: if the scenario needs flexible ad hoc queries, multi-table joins, or strict relational constraints, DynamoDB is wrong — use RDS or Aurora. If it needs known-key access at massive scale with no operational tuning, a relational database is the wrong answer — use DynamoDB.
In-memory and vector workloads: MemoryDB, HNSW on Aurora, and IVF
Two newer Task 2.1 skills are applying Amazon MemoryDB for fast key/value access and describing vector index types.
MemoryDB is a durable, Valkey- and Redis-compatible in-memory database: microsecond reads, single-digit-millisecond writes, and — unlike a plain cache — durability from a Multi-AZ transaction log, so it can serve as a primary database, not just a cache in front of one. Reach for it when the question demands ultra-low-latency key/value access with data safety (session state, leaderboards, real-time feature lookups). ElastiCache remains the answer for pure caching in front of another system of record; MemoryDB is the answer when the in-memory store is the system of record.
Vector search stores embeddings and finds nearest neighbors for semantic search and retrieval-augmented generation. Aurora PostgreSQL with the pgvector extension supports approximate-nearest-neighbor indexes, and the exam names HNSW (Hierarchical Navigable Small Worlds) explicitly: a multi-layer graph index navigated from coarse to fine layers. HNSW gives high recall and fast queries, can be built on an empty table and updated incrementally, but costs more memory and build time.
IVF (Inverted File, pgvector's IVFFlat) clusters vectors into lists and searches only the nearest lists at query time. It builds faster and uses less memory, but it must be trained on data already present (build it after loading), and recall depends on how many lists you probe — more probes, better recall, slower queries.
Exam rule of thumb: HNSW for query-speed and recall priorities on evolving data; IVF for faster, cheaper index builds on a stable, fully loaded dataset.
Streams as storage, EMR, and Lake Formation
Task 2.1's service list also includes stores that don't look like databases.
Kinesis Data Streams and Amazon MSK are short-term storage, not just pipes: both retain records for a configurable window (Kinesis from 24 hours up to 365 days; Kafka topics per retention policy), letting multiple consumers read independently and rewind for replay. Choose them as the storage layer when the requirement is ordered, replayable event data consumed by several systems — and choose MSK specifically only when the scenario requires Apache Kafka compatibility or an existing Kafka ecosystem; otherwise Kinesis is the lower-operational-overhead answer.
Amazon EMR offers a storage decision inside the cluster: HDFS on the cluster's instance stores is fast but ephemeral — it vanishes with the cluster — while EMRFS reads and writes Amazon S3 directly, decoupling storage from compute. The exam-preferred pattern keeps persistent data in S3 via EMRFS and treats clusters as disposable (including transient clusters that terminate after each job, the cost-optimization answer); HDFS is for temporary shuffle and scratch data within a job's lifetime.
AWS Lake Formation is not a storage engine — it is the governance layer over an S3 data lake. It registers S3 locations, and grants database-, table-, column-, row-, and cell-level permissions that Athena, Redshift Spectrum, Glue, and EMR enforce, replacing per-service bucket-policy sprawl with one permission model. When a question pairs "data lake on S3" with "fine-grained access control," Lake Formation is the answer; when it asks where the data physically lives, the answer is still S3.
Open table formats: Apache Iceberg on S3
Managing open table formats means running Apache Iceberg tables on S3, and Iceberg exists to give data-lake files the behaviors of a database table: ACID transactions, safe concurrent writers, schema evolution, and time travel.
Plain Parquet-on-S3 tables break down when you need to update or delete individual rows, evolve schemas without rewriting data, or read consistently while a write is in flight. Iceberg fixes this with a metadata layer of snapshots and manifest files: every commit produces a new table snapshot, readers see a consistent snapshot, and writers commit atomically. That buys you row-level updates and deletes (the standard answer for GDPR-style deletes in a data lake), schema evolution (add, rename, drop columns as metadata-only changes), hidden partitioning (queries prune partitions without filtering on a derived partition column, and partition schemes can change without rewriting the table), and time travel (query the table as of a prior snapshot or timestamp).
On AWS, Iceberg is a first-class format: Athena creates and queries Iceberg tables with full DML, AWS Glue jobs read and write them and the Glue Data Catalog serves as the Iceberg catalog, Amazon EMR (Spark) supports them, and Amazon Redshift can query them. Amazon S3 Tables provides S3 bucket-native managed Iceberg tables with built-in maintenance.
The management duties the exam probes: small streaming writes accumulate many small files, so run compaction (Athena OPTIMIZE ... REWRITE DATA, or Glue/S3 Tables automatic compaction), and expire old snapshots so time-travel metadata and orphaned files don't grow storage forever.
Managing locks, and landing files with AWS Transfer Family
Locks prevent conflicting access to data, and the exam tests how to find and clear blocking locks in Redshift and RDS.
Amazon Redshift takes table-level locks: reads take a shared AccessShareLock, while DDL and operations such as TRUNCATE or ALTER TABLE take an AccessExclusiveLock that blocks everything else. The classic symptom is an ETL job or BI query hanging because a long transaction — often an idle session that never committed — holds an exclusive lock. Diagnose with the lock and transaction system views (SVV_TRANSACTIONS, STV_LOCKS), identify the blocking process ID, and clear it with PG_TERMINATE_BACKEND(pid). Prevent recurrences by keeping transactions short and committing promptly in ETL sessions.
Amazon RDS and Aurora engines use row-level locking under MVCC, so readers don't block writers; problems appear as lock waits and deadlocks between writers. Find blockers through the engine's lock views (for example pg_locks in PostgreSQL or InnoDB status in MySQL) and Performance Insights, terminate the blocking session if needed, and design transactions to touch rows in a consistent order to avoid deadlocks.
AWS Transfer Family is the migration-and-ingestion tool in this task: a fully managed SFTP, FTPS, FTP, and AS2 endpoint that writes received files directly into Amazon S3 (or Amazon EFS). It is the answer whenever partners or legacy systems must keep pushing files over SFTP but you want them landing in the data lake with zero servers to run. From there the pipeline is event-driven: the S3 upload triggers EventBridge or S3 Event Notifications, which start the Glue job that processes the file.
Tip. Expect scenario questions that describe an access pattern, latency need, and cost constraint, then ask for the MOST cost-effective or lowest-operational-overhead store — the wording of the access pattern picks the service. Redshift questions test distribution styles, sort keys, Serverless vs provisioned, and choosing among Spectrum, federated queries, and materialized views. Newer items cover HNSW vs IVF vector indexes, MemoryDB as a durable in-memory store, and Iceberg capabilities like row-level deletes, schema evolution, and time travel. Lock questions center on finding and terminating a blocking Redshift transaction.
- Read the access pattern first: analytics → Redshift or S3+Athena, OLTP → RDS/Aurora, key/value at scale → DynamoDB, microsecond in-memory → MemoryDB, replayable events → Kinesis/MSK.
- S3 + Athena is the cost answer for infrequently queried data; an always-on Redshift cluster for occasional queries is the classic trap.
- Redshift: KEY distribution co-locates joins, ALL suits small dimensions, sort keys prune scans; RA3 and Serverless decouple or eliminate cluster cost.
- Spectrum queries S3 in place, federated queries reach live RDS/Aurora data, materialized views precompute repeated aggregations — none of them copy data by hand.
- MemoryDB is a durable in-memory primary database, not just a cache; HNSW indexes favor recall and query speed, IVF favors cheap builds on already-loaded data.
- Apache Iceberg adds ACID transactions, row-level deletes, schema evolution, and time travel to S3 tables — and needs compaction and snapshot expiry as ongoing maintenance.
- Blocked Redshift queries usually mean an uncommitted transaction holding an AccessExclusiveLock: find it in the system views, terminate it with PG_TERMINATE_BACKEND.
- AWS Transfer Family gives partners a managed SFTP endpoint that drops files straight into S3, where events trigger the rest of the pipeline.
Frequently asked questions
When should I choose Amazon Redshift over Amazon S3 with Athena?
Choose Redshift when analytics run frequently, demand consistently low latency, involve complex joins across large structured tables, or power always-on BI dashboards — a warehouse you use constantly justifies its cost, and features like distribution keys, sort keys, and materialized views keep it fast. Choose S3 with Athena when queries are ad hoc or infrequent, because S3 storage is cheap and Athena bills per query with zero infrastructure. Many real designs use both: hot data in Redshift, cold history in S3 queried through Redshift Spectrum.
What is the difference between Redshift Spectrum and a federated query?
Both query data outside the cluster, but they target different sources. Redshift Spectrum queries files in Amazon S3 through external tables defined in the Glue Data Catalog — it's for data-lake data. Federated queries connect to live operational databases (Amazon RDS and Aurora PostgreSQL or MySQL) and query their current rows without ETL. If the question says the data is in S3, the answer is Spectrum; if the data is in a running relational database, the answer is a federated query.
When is Amazon MemoryDB the right choice instead of ElastiCache or DynamoDB?
MemoryDB is the answer when an application needs microsecond-latency key/value access and the in-memory store must be the durable system of record — it persists every write to a Multi-AZ transaction log, so data survives node failure. ElastiCache is for pure caching in front of another database, where losing cached data is acceptable. DynamoDB offers single-digit-millisecond (not microsecond) latency with effectively unlimited scale and lower cost per gigabyte; step up to MemoryDB only when milliseconds are genuinely too slow.
What is the difference between HNSW and IVF vector indexes?
Both are approximate-nearest-neighbor index types for vector search, supported by pgvector on Aurora PostgreSQL. HNSW builds a multi-layer navigable graph: queries are fast with high recall, and the index can be created empty and updated incrementally, at the cost of more memory and longer build times. IVF clusters vectors into lists and searches only the closest lists: it builds faster and uses less memory, but it must be created after the data is loaded, and recall depends on how many lists each query probes.
Why would a data lake team adopt Apache Iceberg instead of plain Parquet tables?
Plain Parquet tables on S3 cannot update or delete individual rows safely, evolve schemas without rewrites, or guarantee consistent reads during writes. Iceberg's snapshot-based metadata layer adds ACID transactions, row-level updates and deletes (essential for compliance deletes), metadata-only schema evolution, hidden partitioning, and time travel to previous snapshots. Athena, Glue, EMR, and Redshift all support Iceberg, so the same table serves every engine. The trade-off is maintenance: compacting small files and expiring old snapshots.
How do I fix a query that hangs because of a lock in Amazon Redshift?
Redshift uses table-level locks, and a hanging query almost always means another transaction holds an AccessExclusiveLock on the table — commonly an ETL session that began a transaction and never committed. Query the system views (SVV_TRANSACTIONS, STV_LOCKS) to identify the blocking transaction's process ID, then terminate it with PG_TERMINATE_BACKEND(pid). Prevent it by keeping DDL and load transactions short and ensuring every session commits or rolls back promptly.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.