passdrill
AWS SAA-C03 · RDS, DynamoDB & Databases · Card 018/024 easy

A DynamoDB table stores session records that should be automatically removed roughly a day after they expire, without the application running a scheduled job to scan and delete old items, and without consuming any write capacity for the expiring items. Which feature should the team configure, and what must the expiration attribute contain?

  1. DynamoDB Streams, configured to trigger a Lambda function that deletes each item once its session attribute indicates expiry
  2. A global secondary index on a session-expiry attribute, combined with a scheduled Scan that deletes items older than the cutoff
  3. On-demand backups scheduled daily, restoring only the non-expired items into a new table each day
  4. Time to Live (TTL), pointed at an attribute holding the expiration time as a Number in Unix epoch seconds; DynamoDB deletes expired items automatically, typically within a few days, without consuming write throughput
Next card → Shuffle