QuestionQ88

Data Operations and Support

A data engineer is creating a new data pipeline that stores metadata in an Amazon DynamoDB table. The engineer must make sure that all items older than a specified age are removed from the DynamoDB table every day.

Which solution satisfies this requirement with the LEAST configuration effort?

  • A Enable DynamoDB TTL on the DynamoDB table. Adjust the application source code to set the TTL attribute appropriately.
  • B Create an Amazon EventBridge rule that uses a daily cron expression to trigger an AWS Lambda function to delete items that are older than the specified age.
  • C Add a lifecycle configuration to the DynamoDB table that deletes items that are older than the specified age.
  • D Create a DynamoDB stream that has an AWS Lambda function that reacts to data modifications. Configure the Lambda function to delete items that are older than the specified age.
Explanation

DynamoDB TTL provides managed, per-item expiration: the application writes a Unix-epoch expiration timestamp to the configured TTL attribute, and DynamoDB automatically deletes expired items in the background at no extra cost. This avoids building or scheduling any custom deletion logic, scan jobs, or stream processors, making it the lowest-configuration option for age-based item cleanup.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!