Consider a DynamoDB table with TTL enabled on the attribute expiryTimestamp. What is the expected behavior when an item's TTL expires?
TTL deletion is not immediate but happens asynchronously by DynamoDB.
DynamoDB TTL deletes expired items asynchronously, and when deleted, a stream record of type REMOVE is generated for that item.
What is the main reason to enable DynamoDB Streams when using TTL for archival purposes?
Think about how you can keep a copy of deleted items.
Streams capture REMOVE events caused by TTL expiration, allowing you to archive the deleted items elsewhere before they are lost.
Given a DynamoDB Stream event record, which eventName indicates an item was deleted due to TTL expiration?
TTL deletions remove items from the table.
TTL deletions generate a stream event with eventName set to "REMOVE" because the item is deleted.
You enabled TTL and DynamoDB Streams on your table, but you notice no REMOVE events appear in the stream when items expire. What could be the cause?
TTL deletions are asynchronous and can take up to 48 hours to appear in streams.
TTL deletions happen asynchronously and may take up to 48 hours to process, so no immediate stream events appear even after expiration.
You want to archive expired items from a DynamoDB table to S3 using TTL and Streams. Which approach optimizes cost and reliability?
Think about asynchronous processing and batching for cost efficiency.
Using TTL with Streams and a Lambda triggered on REMOVE events allows efficient, reliable, and cost-effective archiving by batching writes to S3 asynchronously.