Index Capacity and Cost in DynamoDB
📖 Scenario: You are managing a DynamoDB table for an online bookstore. You want to understand how adding a Global Secondary Index (GSI) affects the table's capacity and cost.
🎯 Goal: Build a DynamoDB table with a primary key and a Global Secondary Index. Configure the read and write capacity units for both the table and the index to see how capacity is allocated.
📋 What You'll Learn
Create a DynamoDB table named
Books with a primary key BookID (string).Add a Global Secondary Index named
AuthorIndex with Author as the partition key (string).Set the table's read capacity units to 5 and write capacity units to 5.
Set the GSI's read capacity units to 3 and write capacity units to 2.
💡 Why This Matters
🌍 Real World
Managing DynamoDB tables with indexes is common in real-world applications to optimize query performance and control costs.
💼 Career
Understanding how to configure capacity units for tables and indexes is essential for database administrators and backend developers working with AWS DynamoDB.
Progress0 / 4 steps