Easy1 markMultiple Choice
Domain 3.3: Performance ImprovementPerformanceDynamoDBCost Optimization

AWS SAP-C02 · Question 55 · Domain 3.3: Performance Improvement

An application uses Amazon DynamoDB. The development team notices that a specific query is consuming a massive amount of Read Capacity Units (RCUs). The query searches for users by their 'EmailAddress' attribute, which is not the partition key or sort key of the table. The table has 10 million items. How can the Architect optimize the performance and cost of this query?

Answer options:

A.

Create a Global Secondary Index (GSI) on the table with 'EmailAddress' as the partition key. Update the application to query the GSI.

B.

Create a Local Secondary Index (LSI) on the table with 'EmailAddress' as the sort key.

C.

Enable DynamoDB Accelerator (DAX) to cache the results of the query.

D.

Increase the provisioned RCUs for the table to handle the load.

How to approach this question

Identify the DynamoDB feature used to query efficiently on non-primary key attributes.

Full Answer

A.Create a Global Secondary Index (GSI) on the table with 'EmailAddress' as the partition key. Update the application to query the GSI.✓ Correct
Create a Global Secondary Index (GSI) on the table with 'EmailAddress' as the partition key. Update the application to query the GSI.
In DynamoDB, searching for an item by an attribute that is not the primary key requires a `Scan` operation, which reads every item in the table and consumes massive RCUs. To optimize this, you create a Global Secondary Index (GSI) with `EmailAddress` as the partition key. You can then perform a highly efficient `Query` operation on the GSI, drastically reducing RCU consumption and improving performance.

Common mistakes

Choosing LSI, which cannot be added after table creation and cannot change the partition key.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 5

75 questions · hints · full answers · grading

More questions from this exam