AWS Certified Database – Specialty — Question 226
A company uses Amazon DynamoDB as a data store for multi-tenant data. Approximately 70% of the reads by the company's application are strongly consistent. The current key schema for the DynamoDB table is as follows:
Partition key: OrgID -
Sort key: TenantID#Version -
Due to a change in design and access patterns, the company needs to support strongly consistent lookups based on the new schema below:
Partition key: OrgID#TenantID -
Sort key: Version -
How can the database specialist implement this change?
Answer options
- A. Create a global secondary index (GSI) on the existing table with the specified partition and sort key.
- B. Create a local secondary index (LSI) on the existing table with the specified partition and sort key.
- C. Create a new table with the specified partition and sort key. Create an AWS Glue ETL job to perform the transformation and write the transformed data to the new table.
- D. Create a new table with the specified partition and sort key. Use AWS Database Migration Service (AWS DMS) to migrate the data to the new table.
Correct answer: C
Explanation
The correct answer is C because creating a new table with the updated key schema allows for the proper structuring of data for strong consistency. This process also includes using an AWS Glue ETL job, which is necessary for transforming and loading existing data into the new schema. Options A and B do not address the need for a new schema, while option D, although a valid migration method, does not specify the transformation process required for strong consistency.