Skip to main content

DVA-C02 practice question · Development with AWS Services

A developer wants to query a DynamoDB table efficiently using an attribute that is not the table's partition key…

A developer wants to query a DynamoDB table efficiently using an attribute that is not the table's partition key, without scanning the entire table. What should they create?

  • AA global secondary index (GSI) on that attribute
  • BA DynamoDB Stream on the table
  • CA new DynamoDB table with the same data duplicated manually
  • DA larger provisioned read capacity on the base table
Show the answer and explanation

Correct answer: A) A global secondary index (GSI) on that attribute

Why each option is right or wrong

  • A) Correct. A GSI defines an alternate partition (and optional sort) key, letting you query efficiently on an attribute other than the table's primary key without a full table scan.
  • B) Incorrect. Streams capture change events for downstream consumers; they don't provide an alternate query pattern on existing data.
  • C) Incorrect. Manually duplicating data into a second table is unnecessary and hard to keep in sync — a GSI achieves the same query flexibility within the same table.
  • D) Incorrect. More read capacity speeds up a scan but doesn't avoid scanning the whole table for a non-key attribute; a GSI is the correct tool for that access pattern.
Exam domain
Development with AWS Services · 32% of DVA-C02
Question type
Multiple choice (one answer)

Practise the full DVA-C02 exam

This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.

Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.