Skip to main content

Use Case for DynamoDB Stale Data Table

  1. Configure DynamoDB Stale Data Table
  2. Use Case for DynamoDB Stale Data Table
  3. Triage Guides by Violation Type
    1. Triage DynamoDB Stale Data Table TABLE_DATA_STALE
    2. Triage DynamoDB Stale Data Table TABLE_NOT_CONFIGURED_FOR_DATA_CAPTURE

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

  1. The policy fetches the latest update time of the specified DynamoDB table using the DescribeTable API.
  2. It compares this time to the current time to determine the number of days since the last update.
  3. If the table is not configured for data capture (latestStreamLabel is null) or the data is stale, it registers the appropriate violation.