Courseiva
Workload-Specific Database DesignmediumMultiple SelectObjective-mapped

Comparing DynamoDB and Timestream for IoT Time-Series Database Design

A company is designing a database for an IoT application that ingests sensor data from thousands of devices. Each device sends a reading every minute. The data includes device_id, timestamp, temperature, humidity, and pressure. The application needs to store this data and support queries that retrieve all readings for a specific device within a time range. The company expects high write throughput and moderate read frequency. The data must be stored with high durability. Which TWO database designs are appropriate for this workload? (Choose TWO.)

Quick Answer

The correct answers are Amazon Timestream with device_id as dimension and timestamp as time column, and DynamoDB with device_id as partition key and timestamp as sort key. Timestream is purpose-built for IoT time-series database design, automatically optimizing storage and query performance for sensor data ingested at high frequency, while its schema of dimensions and time columns directly maps to the device_id and timestamp fields in this workload. DynamoDB’s composite key design enables efficient range queries using a KeyConditionExpression on the sort key, and its partition-based scaling handles the high write throughput from thousands of devices, with multi-AZ replication ensuring high durability. On the AWS Certified Database Specialty DBS-C01 exam, this question tests your ability to distinguish between a managed time-series service and a NoSQL key-value store for time-series patterns—a common trap is choosing a relational database like RDS, which lacks the write scaling and time-range query efficiency required here. Memory tip: for IoT time-series, think “Timestream for turnkey, DynamoDB for DIY partitioning.”

⚠ Common exam trap

The trap here is that candidates often overlook DynamoDB's item size limit and write hotspot issues in Option A, or assume that any SQL database can handle high write throughput without considering single-writer bottlenecks in Option D.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Amazon DynamoDB with device_id as partition key and timestamp as sort key.

DynamoDB's partition key (device_id) and sort key (timestamp) design allows efficient retrieval of all readings for a specific device within a time range using a Query operation with a KeyConditionExpression on the sort key. This schema supports high write throughput by distributing writes across partitions based on device_id, and DynamoDB's multi-AZ replication provides high durability.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use Amazon DynamoDB with device_id as partition key and store all readings for a device as a list attribute in a single item, updating the list every minute.

    Why it's wrong here

    The list would grow too large and exceed the 400 KB item limit.

  • Use Amazon S3 to store compressed JSON files per device per hour, and query using Amazon Athena.

    Why it's wrong here

    This is not suitable for real-time queries and high write frequency.

  • Use Amazon DynamoDB with device_id as partition key and timestamp as sort key.

    Why this is correct

    DynamoDB can handle high write throughput and efficient queries by device and time range.

  • Use Amazon RDS for MySQL with a single table and index on device_id and timestamp.

    Why it's wrong here

    A single RDS instance cannot scale to high write throughput from thousands of devices.

  • Use Amazon Timestream, a time series database, with device_id as dimension and timestamp as time column.

    Why this is correct

    Timestream is purpose-built for time series data and handles high write throughput.

About these practice questions

Courseiva writes every DBS-C01 question from scratch — 1,663 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DBS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is selecting a database for a time-series application that collects sensor data from thousands of devices. The data is written at a high velocity (millions of data points per second). The application needs to query recent data (last hour) with sub-second latency and perform long-term analysis on months of data. Which TWO AWS database services best meet these requirements?

easy
  • A.Amazon ElastiCache for Redis with Time Series module.
  • B.Amazon Timestream for both real-time and historical queries.
  • C.Amazon DynamoDB with TTL and export to S3 for historical analysis.
  • D.Amazon Redshift for real-time queries and historical analysis.
  • E.Amazon Quantum Ledger Database (QLDB) for immutable time-series records.

Why B: Amazon Timestream is purpose-built for time-series data, with separate storage tiers for recent (in-memory) and historical (magnetic) data. It automatically moves data between tiers, enabling sub-second queries on the last hour via the memory store and efficient long-term analysis on months of data via the magnetic store, meeting both velocity and latency requirements. Amazon DynamoDB with TTL and export to S3 also meets the requirements: DynamoDB provides sub-second latency for writes and queries on recent data (by using TTL to expire old data), and exporting data to S3 via DynamoDB Streams and AWS Glue or Athena allows cost-effective long-term analysis. This combination handles high-velocity ingestion and provides real-time access to the last hour, while S3-based analytics support historical queries.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.