DynamoDB Streams
DynamoDB Streams
- Time-Ordered sequence of item level modifications
- inserts, updates, deletes
- Logs are encrypted at rest and stored for 24 hours
- Accessed using a dedicated endpoint
- separate endpoints for database and stream
- By default the Primary Key is recorded
- Before and After images can be captured
- Can use a stream to trigger lambda function based on change in DynamoDB table
Stream View Types
- KEYS_ONLY
- Only the key attributes of the modified item are written to the stream
- NEW_IMAGE
- The entire item, as it appears after it was modified, is written to the stream
- OLD_IMAGE
- The entire item, as it appeared before it was modified, is written to the stream
- NEW_AND_OLD_IMAGES
- Both the new and old item images of the item are written to the stream
Processing DynamoDB Streams
- Events are recorded in near real-time
- good for serverless applications
- Applications can take actions based on contents
- Event source for Lambda
- Lambda can execute and launch functions based on events happening in the stream
- Lambda polls the DynamoDB stream
- Executes LAmbda code based on a DynamoDB Streams event
Capturing Table Activity with DynamoDB Streams
Exam Tips
- Time-ordered sequence of item level modifications in your DynamoDB Tables
- Data is stored for 24 hours only
- Can be used as an event source for Lambda so you can create applications which take actions based on events in your DynamoDB Table