CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Amazon DynamoDB Streams & Global Tables — Real-time data processing and global replication
DynamoDB Streams and Global Tables enable real-time data processing and multi-region replication for applications requiring low latency and high availability.
What it is
- DynamoDB Streams: Captures changes to items in a DynamoDB table and allows you to react to these changes in real-time.
- Global Tables: Fully managed, multi-region, and multi-master database that automatically replicates your DynamoDB tables across AWS regions.
When I reach for it
- Use DynamoDB Streams when you need to trigger Lambda functions or other processes in response to data changes (e.g., auditing, notifications).
- Use Global Tables when you require a globally distributed application with low-latency data access and full write availability across regions.
Key architectural decisions
- Choose between single-region vs. multi-region based on latency requirements and disaster recovery strategies.
- Decide on the stream view type (NEW_IMAGE, OLD_IMAGE, etc.) based on the data needed for downstream processing.
- Consider read and write capacity settings for performance tuning based on workload characteristics.
Gotchas & exam traps
- Remember that DynamoDB Streams have a retention period of 24 hours; ensure your application can process data within this window.
- Global Tables require you to manage the region configurations and understand the eventual consistency model.
- Misconfiguring stream settings can lead to unexpected data processing delays or missed events.
The architect view
- Leverage DynamoDB Streams for real-time analytics and event-driven architectures.
- Use Global Tables to enhance disaster recovery and improve user experience in a globally distributed application.