Skip to main content
CloudCertPrep
DVA-C02Domain 1: Development with AWS ServicesServerless & APIshardSingle choice

A DynamoDB table needs queries by an attribute that isn't the partition key, and new query patterns will emerge after launch. Which index type supports this — and what's its key constraint?

A.Local secondary index — addable anytime, any attribute

That's the opposite — LSIs are creation-time only and must share the table's partition key.

B.Global secondary index — any partition/sort key, addable after table creation, with its own provisioned throughput

Correct. GSI = flexible keys + post-creation + own throughput.

C.Local secondary index — any partition key

LSIs reuse the table's partition key — only the sort key changes.

D.A scan with a filter expression — zero setup

Scans work but burn RCU on every item — the expensive fallback.

Why this answer

GSIs let you query by any attributes, can be added after table creation, and consume their own RCU/WCU. LSIs share the table's partition key (only the sort key differs) and must be defined at table creation — a classic exam trap.

Correct answer: B · Last reviewed 2026-10-27

Official AWS references

Practice this interactively

Answer without seeing the solution first in the Serverless & APIs practice session.

Practice Serverless & APIs