When do you choose DynamoDB over RDS?
IntermediateScenarioS3, RDS and DynamoDB
Answer
Situation read → Known access patterns, massive scale, single-digit-millisecond latency, little ops.
What I'd do →
- Use DynamoDB for key-value or single-table designs like sessions, carts, IoT
- Use RDS or Aurora for relational joins, ad hoc queries and transactions across entities
- Model DynamoDB around queries, using GSIs for alternate access
- Prove the access patterns before committing
Why → DynamoDB is hard to retrofit with new query patterns, so choose it on certainty.
Interview tip → Say "access patterns first".
More on S3, RDS and DynamoDB
You need to host a static website with HTTPS and low latency worldwide. Which services do you use?BeginnerUploaded files in your bucket must be deleted after 90 days and old versions after 30. How do you do that?BeginnerSomeone deleted objects from a versioned bucket. How do you recover and prevent repeats?IntermediateMillions of small objects are being uploaded and S3 returns 503 Slow Down. What do you do?IntermediateLarge 50 GB files upload slowly from remote offices to S3. How do you speed it up?IntermediateDesign a cross-region DR strategy for a critical S3 bucket with a 15-minute RPO.Advanced