Using the Console - Amazon Timestream

Using the Console

You can use the AWS Management Console for Timestream to create tables and databases, run queries and delete databases and tables.

Tutorial

This tutorial shows you how to create a database populated with sample data sets and run sample queries. The sample datasets used in this tutorial are frequently seen in IoT and DevOps scenarios. The IoT dataset contains time series data such as the speed, location, and load of a truck, to streamline fleet management and identify optimization opportunities. The DevOps dataset contains EC2 instance metrics such as CPU, network, and memory utilization to improve application performance and availability. Here’s a video tutorial for the instructions described in this section

Follow these steps to create a database populated with the sample data sets and run sample queries using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Databases

  3. Click on Create database.

  4. On the create database page, enter the following:

    • Choose configuration – Select Sample database.

    • Name – Enter a database name of your choice.

    • Choose sample datasets – Select IoT and DevOps.

    • Click on Create database to create a database containing two tables – IoT and DevOps populated with sample data.

  5. In the navigation pane, choose Query editor

  6. Select Sample queries from the top menu.

  7. Click on one of the sample queries. This will take you back to the query editor with the editor populated with the sample query.

  8. Click Run to run the query and see query results.

Create a database

Follow these steps to create a database using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Databases

  3. Click on Create database.

  4. On the create database page, enter the following:

    • Choose configuration – Select Standard database.

    • Name – Enter a database name of your choice.

    • Encryption – Choose a KMS key or use the default option, where Timestream will create a KMS key in your account if one does not already exist.

  5. Click on Create database to create a database.

Create a table

Follow these steps to create a table using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Tables

  3. Click on Create table.

  4. On the create table page, enter the following:

    • Database name – Select the name of the database created in Create a database.

    • Table name – Enter a table name of your choice.

    • Memory store retention – Specify how long you want to retain data in the memory store. The memory store processes incoming data, including late arriving data (data with a timestamp earlier than the current time) and is optimized for fast point-in-time queries.

    • Magnetic store retention – Specify how long you want to retain data in the magnetic store. The magnetic store is meant for long term storage and is optimized for fast analytical queries.

  5. Click on Create table.

Run a query

Follow these steps to run queries using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Query editor

  3. In the left pane, select the database created in Create a database.

  4. In the left pane, select the database created in Create a table.

  5. In the query editor, you can run a query. To see the latest 10 rows in the table, run:

    SELECT * FROM <database_name>.<table_name> ORDER BY time DESC LIMIT 10

Delete a table

Follow these steps to delete a database using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Tables

  3. Select the table that you created in Create a table.

  4. Click Delete

  5. Type delete in the confirmation box.

Delete a database

Follow these steps to delete a database using the AWS Console:

  1. Open the AWS Console.

  2. In the navigation pane, choose Databases

  3. Select the table that you created in Create a database.

  4. Click Delete

  5. Type delete in the confirmation box.