Use Case for DynamoDB Stale Data Table
Quick Links
- Configure DynamoDB Stale Data Table
- Use Case for DynamoDB Stale Data Table
- Triage Guides by Violation Type
DynamoDB Stale Data Table
This policy identifies DynamoDB tables that appear to have stale data, i.e., data which has not been updated recently. Utilizing this policy can help ensure data freshness and alert you to tables that may not be getting the updates they need.
Pros
- Automated Monitoring: Continually checks DynamoDB tables for stale data without requiring manual oversight.
- Cost Management: Helps identify unused or infrequently updated tables that might be costing money without providing value.
- Data Freshness: Ensures that your data remains up-to-date and relevant.
Cons
- False Positives: Might flag tables that are not frequently updated by design.
- Resource Usage: Additional Lambda invocations and API calls may have a cost impact, though minimal.
Policy Details
When this policy runs, it checks the DynamoDB table specified in the resource URN for its latest update. If the table has not been updated beyond the threshold defined in dynamodb_table_stale_data_max_days
, it will trigger an alert.
Variables
dynamodb_table_stale_data_max_days
: The maximum number of days a table can go without updates before it is considered stale. Defaults to 90 days.
Violation Types
TABLE_NOT_CONFIGURED_FOR_DATA_CAPTURE
: Indicates that the table is not configured for change data capture (latestStreamLabel
is null).TABLE_DATA_STALE
: Indicates that the table's data is stale, i.e., it hasn't been updated within the specified number of days.
How it Works
- The policy fetches the latest update time of the specified DynamoDB table using the
DescribeTable
API. - It compares this time to the current time to determine the number of days since the last update.
- If the table is not configured for data capture (
latestStreamLabel
is null) or the data is stale, it registers the appropriate violation.