AWS Certified Developer – Associate — Question 177
A company is managing a NoSQL database on-premises to host a critical component of an application, which is starting to have scaling issues. The company wants to migrate the application to Amazon DynamoDB with the following considerations:
• Optimize frequent queries
• Reduce read latencies
• Plan for frequent queries on certain key attributes of the table
Which solution would help achieve these objectives?
Answer options
- A. Create global secondary indexes on keys that are frequently queried. Add the necessary attributes into the indexes.
- B. Create local secondary indexes on keys that are frequently queried. DynamoDB will fetch needed attributes from the table.
- C. Create DynamoDB global tables to speed up query responses. Use a scan to fetch data from the table
- D. Create an AWS Auto Scaling policy for the DynamoDB table.
Correct answer: A
Explanation
Creating global secondary indexes on frequently queried keys allows for optimized querying and reduced read latencies by providing alternate access patterns. Local secondary indexes, while useful, would not meet the need for optimization on global queries. DynamoDB global tables focus on multi-region replication rather than query optimization, and an AWS Auto Scaling policy would help with scaling but does not directly address query performance.