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 the data expires, Amazon Keyspaces filters it out from application reads immediately. Keyspaces deletes expired data automatically, typically within 10 days after it expires. Keyspaces TTL is fully managed. You are not responsible for running the data clean up 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 see the TTL documentation.attributes deleted by using TTL. TTL is available in the Amazon Web Services China (Beijing) Region, operated by Sinnet, and the Amazon Web Services China (Ningxia) Region, operated by NWCD. To learn more, see Expiring Data By Using Amazon Keyspaces Time to Live (TTL).