Building a Time Series Data Analytics Platform with Amazon Timestream - Storing IoT Data and Optimizing Queries
IoT sensor data is ingested into Timestream, and time series analysis is performed with SQL-based real-time aggregation and scheduled queries. This article explains cost optimization through automatic tiering between the memory store and the magnetic store.
Overview of Timestream
Amazon Timestream is a fully managed time series database service. It lets you ingest large volumes of timestamped data, such as IoT sensor data, application metrics, and infrastructure monitoring data, and analyze it with SQL. When time series data is handled in a traditional RDB, partitioning and index design require careful thought, and query performance tends to degrade as data volume grows. Timestream has a storage engine optimized for time series data, and AWS states that it can store and analyze trillions of time series data points per day. Unlike key-value stores such as DynamoDB, its strength is that aggregation queries that specify time ranges and time series functions (moving averages, interpolation, differences) can be written directly in SQL. This traditional Timestream for LiveAnalytics stopped accepting new customers on June 20, 2025, and Timestream for InfluxDB is suggested for new time series workloads.
Data Model and Store Tiering
The Timestream data model has three levels: databases, tables, and records. Each record consists of dimensions (identifying attributes such as device ID and region), measures (measured values such as temperature and humidity), and a timestamp. Storage has a two-tier structure of a memory store and a magnetic store, and the memory store retention period (1 hour to 8766 hours) is set for each table. Data that passes the memory store retention period automatically moves to the magnetic store, and no data migration processing is needed on the application side. Queries search the memory store and the magnetic store transparently, so there is no need to be aware of where the data resides. The memory store costs about $0.036/hour per GB and the magnetic store about $0.03/month per GB, a large cost difference, so retention period design is the key to cost optimization (as of October 2026).
Queries and Time Series Functions
Timestream provides its own query language that extends standard SQL with time series functions. With the CREATE_TIME_SERIES function, you can convert records into time series objects and fill in missing data with INTERPOLATE_LINEAR (linear interpolation) and INTERPOLATE_SPLINE (spline interpolation). Aggregate functions such as moving averages, cumulative sums, differences, and percentiles are also provided as built-ins. Scheduled queries are a feature that runs queries periodically and writes the results to another table. You can automate preprocessing such as aggregating raw data at 1-minute intervals into 1-hour averages and storing them in the magnetic store, which leads to lower dashboard query costs. An integration plugin for Grafana is officially provided, and you can visualize Timestream data in real time on Grafana dashboards.
Timestream Pricing
Timestream pricing consists of three elements: writes, storage, and queries. Writes cost about $0.50 per million 1 KiB writes. The memory store costs about $0.036/hour per GB, and the magnetic store about $0.03/month per GB. Queries are billed according to the time of compute capacity used (TCU), at about $0.518 per TCU-hour (as of October 2026). Running dashboard queries against data pre-aggregated with scheduled queries reduces the amount of query processing and leads to lower query costs. A design that sets the memory store retention period to the minimum necessary and keeps historical data at low cost in the magnetic store is recommended.
Characteristics and Use Cases of Time Series Data
Time series data consists of values recorded continuously over time, such as IoT sensor measurements, application metrics, and equipment operation logs. These share common characteristics: large volumes of data are written continuously, newer data is referenced more frequently, and data is often aggregated over time ranges. Timestream is designed to handle such time series data efficiently. It is suited to use cases that ingest enormous numbers of data points at high speed and perform aggregation and trend analysis along the time axis. It plays an active role in scenarios that analyze data changing over time, such as equipment monitoring, demand forecasting, and anomaly detection.
Choosing Between Timestream and Other Databases
Time series data can also be stored in general-purpose databases, but as data volume becomes enormous, problems arise in terms of write performance, storage costs, and the efficiency of time range queries. Dedicated time series databases are optimized for these problems: they efficiently handle large volumes of writes, automatically move old data to inexpensive tiers, and provide analytical functions specific to time series. If transaction processing or the management of complex related data is central, the choice is a general-purpose database, and if accumulating and analyzing large volumes of time-linked data is central, it is a time series database. Choosing between them in this way according to the nature of the data leads to optimized performance and cost.
Summary
Amazon Timestream is a fully managed database specialized for time series data that achieves both large-scale ingestion and SQL analysis of IoT sensor data and application metrics. It optimizes costs through automatic tiering between the memory store and the magnetic store, and automates pre-aggregation with scheduled queries. Real-time visualization through the Grafana integration and advanced analysis with time series functions are combined and put to use.
References (Official AWS Resources)
The primary sources for this page are the official AWS website and documentation. Check the official pages below for the latest specifications and pricing.
- Amazon Timestream official page
- AWS IoT Core official page
- Amazon Managed Grafana official page
- AWS Documentation (official)
If this page and the official documentation disagree, treat the official documentation as authoritative.