Implementing DynamoDB to MySQL Replication for Data Recording

Record DynamoDB Table Changes to MySQL Database

Prev Question Next Question

Question

A company has an application that is making use of a DynamoDB table.

There is now a requirement to ensure that all changes to the items in the table are recorded and stored in a MySQL database.

Which of the following would ideally be one of the implementation steps?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - C.

The AWS Documentation mentions the following.

DynamoDB Streams enables solutions such as these and many others.

DynamoDB Streams captures a time-ordered sequence of item-level modifications in any DynamoDB table and stores this information in a log for up to 24 hours.

Applications can access this log and view the data items as they appeared before and after they were modified, in near real-time.

Option A is invalid since this is used to provide a DynamoDB-compatible caching service that enables you to benefit from fast in-memory performance for demanding applications.

Option B is invalid since this is used to provide a fully managed solution for deploying a multi-region, multi-master database, without having to build and maintain your own replication solution.

Option D is invalid since there are no inbuilt triggers in DynamoDB.For more information on DynamoDB streams, please refer to the below URL-

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html

The ideal implementation step for recording and storing changes made to items in a DynamoDB table in a MySQL database is to enable DynamoDB streams. Therefore, the correct answer is option C.

DynamoDB streams provide an ordered, time-sequenced stream of updates that occur to items in a DynamoDB table. Each stream record contains the details of a specific modification to an item in the table, including the nature of the change, the item's primary key, and a timestamp. DynamoDB streams can be used to capture data changes in near real-time and can be used to trigger actions, such as replicating data to other systems.

By enabling DynamoDB streams for the DynamoDB table in question, the stream records can be sent to an AWS Lambda function that can process and transform the data as needed. In this case, the Lambda function can be configured to store the stream records in a MySQL database.

Options A, B, and D are incorrect because they are not directly related to recording and storing changes made to items in a DynamoDB table in a MySQL database.

Option A: Enable DynamoDB Accelerator - is a service that provides fast read access to a DynamoDB table's data by caching frequently accessed items in memory.

Option B: Enable DynamoDB global tables - is a feature that allows for automatic, cross-region replication of DynamoDB tables, which can improve the availability and durability of data.

Option D: Enable DynamoDB triggers - is a feature that allows for invoking an AWS Lambda function or an Amazon SNS topic in response to data changes made to a DynamoDB table.