Storage - Amazon Timestream


Timestream stores and organizes your time series data to optimize query processing time and to reduce storage costs. It offers data storage tiering and supports two storage tiers: a memory store and a magnetic store. When data is first written to Timestream, it arrives in the memory store. The memory store detects duplicate data values, sorts data, and durably stores the data. The memory store also enables you to run fast point in time queries. Memory store is typically used to store the most recent data. On the other hand, the magnetic store is designed for storing historical data. It enables you to run analytic queries based on the volume of data being queried.

Timestream enables you to configure retention policies to move data from the memory store to the magnetic store. When the data reaches the configured value, Timestream automatically moves the data to the magnetic store. You can also set a retention value on the magnetic store. When data expires out of the magnetic store, it is permanently deleted

For example, consider a scenario where you configure the memory store to hold a week’s-worth of data and the magnetic store to hold 1 year’s-worth of data. The age of the data is computed using the timestamp associated with the data point. When the data in the memory store becomes a week old it is automatically moved to the magnetic store. It is then retained in the magnetic store for a year. When the data becomes a year old, it is deleted from Timestream. The retention values of the memory store and the magnetic store cumulatively define the amount of time your data will be stored in Timestream. This means that for the above scenario, from the time of data arrival, the data is stored in Timestream for a total period of 1 year and 1 week.


When you upgrade the retention period of the memory or magnetic store, the retention change takes effective from that point onwards. For example, if the retention period of the memory store was set to 2 hours and then changed to 24 hours by updating the table retention policies, the memory store will be capable of holding 24 hours of data, but will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.

To ensure the security of your time series data, your data in Timestream is always encrypted by default. This applies to data in transit and at rest. Furthermore, Timestream enables you to use customer-managed CMK keys to secure your data in the magnetic store. For more information on customer managed CMKs, see Customer master Keys.