AWS Certified Data Engineer - Associate (DEA-C01) free question 2 / 10 · Domain 1: Data Ingestion and Transformation
Which two statements about DynamoDB Streams are correct? (Choose two.)
- Stream records are kept in the log for 30 days by default and can be read in that period by applications
- Stream records are delivered in batches at the end of the day, so the log is useful for reporting and not for reacting to changes
- Stream records are not duplicated, and the records of a modified item follow the order of its modifications
- A stream record holds just the primary key of the item, with no way to include the item values from before the change
- A stream can be configured so that its records carry the before and after images of the modified items
Show the answer and explanation
Answer: C, E
Why this is correct
DynamoDB Streams captures a time-ordered sequence of item-level modifications and stores it in a log for up to 24 hours. The service makes sure that each stream record appears exactly once and that, for every modified item, the records appear in the same sequence as the actual modifications. By default a record carries the key attributes of the item, and the stream can be configured to capture more, such as the before and after images.
Why the other options are wrong
"Stream records are kept in the log for 30 days by default and can be read in that period by applications" … The page says the log holds the information for up to 24 hours, not 30 days.
"A stream record holds just the primary key of the item, with no way to include the item values from before the change" … By default a record has the primary key attributes of the modified items, but the stream can be configured to capture additional information such as the before and after images.
"Stream records are delivered in batches at the end of the day, so the log is useful for reporting and not for reacting to changes" … DynamoDB Streams writes stream records in near-real time so that applications can take action based on their contents.
Key points
DynamoDB uses separate endpoints for tables and for streams: to read and process stream records, your application must access a DynamoDB Streams endpoint in the same Region. Encryption at rest also encrypts the data in DynamoDB streams.