Q: You create a DynamoDB table heavily queried by `UserID`. Months later, the business wants to query by `EmailAddress`. You go to add a Local Secondary Index (LSI) but the AWS console firmly prevents you. Why?
Local Secondary Indexes (LSIs) are deeply embedded into the physical partition layout of the original DynamoDB table (forcing the same Pa...
#AWS #Cost & Architecture #L2 #Cloud #Infrastructure
🎙️ Candidate Opening & Architectural Context
""AWS reliability requires differentiating between AWS control plane limits and host-level resource exhaustion. The interviewer is testing: Global (GSI) vs Local (LSI) Index immutability constraints.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
Local Secondary Indexes (LSIs) are deeply embedded into the physical partition layout of the original DynamoDB table (forcing the same Partition Key, but allowing a new Sort Key). Because of this physical constraint, LSIs must be created at the exact moment the table is initially created. They are entirely immutable and cannot be added later. *Fix:* You must instead create a Global Secondary Index (GSI). GSIs are essentially asynchronous replica tables maintained by AWS under the hood. They can be dynamically added or securely deleted at any time with zero downtime to the primary table.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Local Secondary Indexes (LSIs) are deeply embedded into the physical partition layout of the original DynamoDB table (forcing the ."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: Local Secondary Indexes (LSIs) are deeply embedded into the physical partition layout of the or
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement