Posted On: Jun 6, 2017
Earlier this year, Amazon DynamoDB released Time-to-Live (TTL), which automatically deletes expired items from your tables, at no additional cost. TTL eliminates the complexity and cost of scanning tables and deleting items that you don't want to retain, saving you money on provisioned throughput and storage.
Today, DynamoDB released a new CloudWatch metric for tracking the number of items deleted by TTL, which is also viewable for no additional charge. This new metric helps you monitor the rate of TTL deletions to validate that TTL is working as expected. For example, you could set a CloudWatch alarm to fire if too many or too few automated deletes occur, which might indicate an issue in how you set expiration timestamps for your items.
Please visit the AWS Database blog which walks through a sample serverless application using TTL to automate a common database management task: how to automatically move old data from your database into archival storage. Archiving old data helps reduce costs and meet regulatory requirements governing data retention or deletion policies. This blog post shows how TTL combined with DynamoDB Streams, Lambda, and Kinesis Firehose, facilitates data archival to a low cost storage service like Amazon S3, a data warehouse like AWS RedShift, or to Amazon Elasticsearch.
The new CloudWatch metric for TTL is available in all AWS regions, effective immediately. To learn more, please refer to the DynamoDB documentation.