Skill 1.3.2

Choose AWS data stores (for example, Amazon ElastiCache, DynamoDB, Amazon S3, Amazon RDS) based on access patterns.

Key Concepts

Amazon DynamoDB suits key-value and document access at any scale with single-digit millisecond latency, where every query is known in advance and uses a key. Amazon RDS and Aurora suit relational data that needs joins, ad hoc SQL queries and multi-table transactions. Amazon S3 stores objects such as files, images and exports, read whole by key. Amazon ElastiCache holds data in memory for sub-millisecond access to sessions, leaderboards and cached query results, but it is not a system of record.

Questions describe the pattern rather than the service: "look up a user profile by ID millions of times per second" points to DynamoDB, "monthly reports that join orders, customers and products" points to RDS or Aurora, and "store uploaded videos" points to S3. When one store cannot serve every pattern, applications combine them, for example DynamoDB as the system of record with ElastiCache in front of it.

Amazon OpenSearch Service handles full-text search, relevance ranking, fuzzy matching and log analytics. A common pattern streams DynamoDB changes through DynamoDB Streams and Lambda (or a zero-ETL integration) into OpenSearch, so the application writes to DynamoDB but searches in OpenSearch.

Other purpose-built options include Amazon Athena for SQL queries directly on data in S3, ElastiCache for in-memory data structures such as leaderboards, and Aurora or RDS for relational queries and joins. Matching the store to the access pattern usually beats forcing one database to do everything.

Choose the store by access pattern: DynamoDB for key-value access at any scale, Amazon RDS or Aurora for relational data with joins and transactions, S3 for objects and files, ElastiCache for in-memory caching, and OpenSearch for full-text search. Aurora adds faster replication, up to 15 read replicas and serverless capacity options on top of MySQL and PostgreSQL compatibility.

Operational features include DynamoDB point-in-time recovery and on-demand backups, RDS automated backups and snapshots, read replicas to offload read traffic, and Multi-AZ deployments for availability. Applications should connect using endpoints rather than instance addresses (the Aurora reader endpoint load-balances across replicas) and pool connections, using RDS Proxy for Lambda.