DynamoDB Streams is a feature that captures changes made to items in a DynamoDB table and stores them as a time-ordered sequence of events.
Click to reveal answer
beginner
How long are records kept in DynamoDB Streams?
Records in DynamoDB Streams are kept for 24 hours before they expire and are removed.
Click to reveal answer
beginner
What types of data changes does DynamoDB Streams capture?
It captures item-level changes such as inserts, updates, and deletes.
Click to reveal answer
intermediate
What is a shard in DynamoDB Streams?
A shard is a container for a sequence of stream records. It helps organize and process the stream data in order.
Click to reveal answer
intermediate
How can you use DynamoDB Streams in an application?
You can use DynamoDB Streams to trigger AWS Lambda functions or replicate data to other systems, enabling real-time processing of table changes.
Click to reveal answer
What does DynamoDB Streams capture?
AUser login events
BNetwork traffic logs
CChanges to items in a DynamoDB table
DBackup snapshots
✗ Incorrect
DynamoDB Streams captures changes made to items in a DynamoDB table, such as inserts, updates, and deletes.
How long are records stored in DynamoDB Streams before they expire?
A30 days
B7 days
CIndefinitely
D24 hours
✗ Incorrect
Records in DynamoDB Streams are kept for 24 hours before they expire.
Which AWS service can be triggered by DynamoDB Streams for real-time processing?
AAWS Lambda
BAmazon S3
CAmazon EC2
DAWS CloudTrail
✗ Incorrect
AWS Lambda can be triggered by DynamoDB Streams to process changes in real time.
What is a shard in the context of DynamoDB Streams?
AA backup copy of the table
BA container for a sequence of stream records
CA type of database index
DA user permission level
✗ Incorrect
A shard is a container that holds a sequence of stream records in DynamoDB Streams.
Which of the following is NOT a use case for DynamoDB Streams?
AStoring large files
BTriggering workflows on data changes
CReal-time data replication
DAuditing item-level changes
✗ Incorrect
DynamoDB Streams is not used for storing large files; it captures changes to table items.
Explain what DynamoDB Streams is and how it helps in managing data changes.
Think about how changes in a database can be tracked and used immediately.
You got /4 concepts.
Describe how DynamoDB Streams integrates with AWS Lambda and why this is useful.
Consider how automatic reactions to data changes can improve applications.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of DynamoDB Streams?
easy
A. To store backups of DynamoDB tables permanently
B. To encrypt data stored in DynamoDB tables
C. To increase the read capacity of a DynamoDB table
D. To track and react to data changes in real time
Solution
Step 1: Understand DynamoDB Streams function
DynamoDB Streams capture data changes like inserts, updates, and deletes in real time.
Step 2: Compare options with Streams purpose
Only To track and react to data changes in real time correctly describes tracking and reacting to data changes. Other options describe unrelated features.
Final Answer:
To track and react to data changes in real time -> Option D
Quick Check:
DynamoDB Streams = Track data changes [OK]
Hint: Streams capture table changes instantly for reaction [OK]
Common Mistakes:
Confusing Streams with backup or encryption features
Thinking Streams increase read capacity
Assuming Streams store data permanently
2. Which setting must be enabled to start using DynamoDB Streams on a table?
easy
A. EncryptionEnabled set to true
B. BackupEnabled set to true
C. StreamEnabled set to true
D. AutoScalingEnabled set to true
Solution
Step 1: Identify the configuration for enabling Streams
To use DynamoDB Streams, the table must have StreamEnabled set to true.
Step 2: Eliminate unrelated settings
BackupEnabled, EncryptionEnabled, and AutoScalingEnabled do not enable Streams.
Final Answer:
StreamEnabled set to true -> Option C
Quick Check:
Enable Streams = StreamEnabled true [OK]
Hint: Enable Streams by setting StreamEnabled true [OK]
Common Mistakes:
Confusing Streams with backups or encryption
Assuming AutoScaling enables Streams
Forgetting to enable Streams explicitly
3. Given a DynamoDB Stream with StreamViewType set to NEW_AND_OLD_IMAGES, what data will the stream record for each change?
medium
A. Only the new item image after the change
B. Both the new and old item images
C. Only the keys of the changed items
D. Only the old item image before the change
Solution
Step 1: Understand StreamViewType NEW_AND_OLD_IMAGES meaning
This setting records both the item before and after the change.
Step 2: Compare options with StreamViewType behavior
Only Both the new and old item images matches the behavior of capturing both new and old images.
Final Answer:
Both the new and old item images -> Option B
Quick Check:
NEW_AND_OLD_IMAGES = new + old data [OK]
Hint: NEW_AND_OLD_IMAGES means capture before and after data [OK]
Common Mistakes:
Choosing only new or only old images
Confusing keys only with full images
Not knowing StreamViewType options
4. A developer enabled DynamoDB Streams but does not see any stream records after table updates. What is the most likely cause?
medium
A. StreamEnabled is false on the table
B. StreamViewType is set to KEYS_ONLY
C. Stream retention period is set to 7 days
D. The table has no primary key defined
Solution
Step 1: Check if Streams are enabled
If StreamEnabled is false, no stream records are generated regardless of updates.
Step 2: Evaluate other options
KEYS_ONLY still produces records; retention period (24-168 hours) does not prevent seeing recent records; tables require primary keys but that doesn't stop streams if enabled.
Final Answer:
StreamEnabled is false on the table -> Option A
Quick Check:
No records = Streams not enabled [OK]
Hint: Streams must be enabled to see records [OK]
Common Mistakes:
Assuming KEYS_ONLY disables records
Thinking retention period prevents seeing records
Ignoring StreamEnabled setting
5. You want to trigger a Lambda function whenever an item is updated in your DynamoDB table to process both the old and new item images. Which DynamoDB Streams configuration and setup is required?
hard
A. Enable Streams with StreamViewType NEW_AND_OLD_IMAGES and configure Lambda trigger on the stream
B. Enable Streams with StreamViewType KEYS_ONLY and configure Lambda trigger on the table
C. Enable Streams with StreamViewType NEW_IMAGE and configure Lambda trigger on the stream
D. Enable Streams with StreamViewType OLD_IMAGE and configure Lambda trigger on the table
Solution
Step 1: Choose StreamViewType for updates
To capture both before and after update data, use NEW_AND_OLD_IMAGES.
Step 2: Configure Lambda trigger on the DynamoDB Stream
Lambda triggers must be set on the stream, not directly on the table.
Final Answer:
Enable Streams with StreamViewType NEW_AND_OLD_IMAGES and configure Lambda trigger on the stream -> Option A
Quick Check:
Lambda trigger on stream with NEW_AND_OLD_IMAGES [OK]
Hint: Use NEW_AND_OLD_IMAGES and trigger Lambda on stream [OK]
Common Mistakes:
Triggering Lambda directly on table instead of stream
Choosing KEYS_ONLY or OLD_IMAGE for update data
Not enabling Streams before Lambda trigger
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.