Posted On: Oct 18, 2021

Amazon Keyspaces (for Apache Cassandra), a scalable, highly available, and fully managed Apache Cassandra–compatible database service, now supports automatic data expiration by using Time to Live (TTL) settings. With TTL, you set expiration times on attributes or rows in your tables, and Keyspaces automatically deletes those expired attributes or rows.

TTL is useful if your data is growing rapidly, and you want to control costs by deleting data that you don’t want to retain indefinitely. If you have compliance requirements corresponding to data retention, you can use TTL to delete data at the desired time. You can specify TTL settings with either INSERT or UPDATE commands, or you can set a default TTL value at the table level. When data expires, Amazon Keyspaces filters it out from application reads immediately.

Amazon Keyspaces deletes expired data automatically, typically within 10 days after it expires. Because Keyspaces TTL is fully managed, you are not responsible for running the data cleanup process, and Keyspaces TTL does not impact the performance of your application.

TTL pricing is based on the number and the size of rows and attributes deleted by using TTL. TTL is available in all AWS Regions where Amazon Keyspaces is offered. To learn more, see Announcing Amazon Keyspaces Time to Live (TTL) general availability on the AWS Database Blog.