📖 What is Amazon DynamoDB?
DynamoDB is a serverless, key-value and document database service offering single-digit millisecond performance at any scale. It is a fully managed NoSQL database designed for applications requiring consistent performance and scalability, supporting both document and key-value data models.
"Focus on understanding DynamoDB’s pricing model based on read/write capacity units (RCUs/WCUs) and storage. Be prepared to differentiate between strongly consistent and eventually consistent reads, and their impact on performance and cost. Pay attention to Global Secondary Indexes (GSIs) and Local Secondary Indexes (LSIs)."
📚 Certification: AWS Certified Solutions Architect - Associate (SAA-C03)
🔑 What are the Key Concepts of Amazon DynamoDB?
- ▸ DynamoDB utilizes RCUs (Read Capacity Units) and WCUs (Write Capacity Units) for predictable performance and scalability; understanding these is crucial for cost optimization.
- ▸ Global Secondary Indexes (GSIs) allow queries on attributes other than the primary key, enabling flexible data access but incurring additional costs.
- ▸ DynamoDB offers both eventually consistent and strongly consistent reads; choose based on application needs, balancing cost and data accuracy.
- ▸ Partition keys are essential for data distribution and scalability; poorly chosen keys can lead to hot partitions and performance bottlenecks.
- ▸ DynamoDB is a NoSQL database, meaning it doesn't use traditional relational database schemas, offering flexibility but requiring different data modeling approaches.
🎯 How does Amazon DynamoDB appear on the SAA-C03 Exam?
You may be asked to select the most cost-effective DynamoDB configuration for an application with predictable read/write patterns, considering provisioned vs. on-demand capacity.
A scenario might describe an application needing to query data based on a non-primary key attribute – identify whether a GSI or LSI is the appropriate solution.
Expect questions about choosing between strongly consistent and eventually consistent reads based on application requirements and the trade-offs between cost and data accuracy.
❓ Frequently Asked Questions
When should I use on-demand capacity mode versus provisioned capacity mode?
On-demand is best for unpredictable workloads, automatically scaling and billing per request. Provisioned is better for predictable workloads where you can optimize capacity and cost.
What are the limitations of Local Secondary Indexes (LSIs)?
LSIs share the same partition key as the base table, limiting query flexibility. They are useful for querying different attributes within the same partition, but not across partitions.
How do I avoid hot partitions in DynamoDB?
Distribute data evenly across partitions by choosing a high-cardinality partition key. Consider using composite keys or techniques like adding a random prefix to the key.