Interview Prep/AWS/RDS, Aurora and DynamoDB

Writes to the base table throttle, but the table itself has plenty of capacity.

AdvancedTroubleshootingRDS, Aurora and DynamoDB
Answer

Likely causes → A GSI is under-provisioned or hot. GSI writes happen asynchronously, but when a GSI cannot keep up, DynamoDB throttles writes on the base table (back-pressure). This often follows adding a GSI with a low-cardinality key.

Diagnose →

aws dynamodb describe-table --table-name orders \
  --query 'Table.GlobalSecondaryIndexes[].[IndexName,ProvisionedThroughput,IndexStatus]'
# CloudWatch WriteThrottleEvents with dimensions TableName + GlobalSecondaryIndexName

Fix →

  1. Raise the GSI's WCU, or switch the table to on-demand
  2. Redesign the GSI partition key so it has high cardinality
  3. Project only the attributes you need, to lower write size

Prevent → Give each GSI the same auto scaling as the base table, and alarm on GSI throttles separately.

aws All AWS questions Roadmap: AWS core services

More on RDS, Aurora and DynamoDB