Using the console
You can use the AWS Management Console for Timestream Live Analytics to create, edit, delete, describe, and list databases and tables. You can also use the console to run queries.
Topics
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
Follow these steps to create a database populated with the sample data sets and run sample queries using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Databases
-
Click on Create database.
-
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.
-
-
In the navigation pane, choose Query editor
-
Select Sample queries from the top menu.
-
Click on one of the sample queries. This will take you back to the query editor with the editor populated with the sample query.
-
Click Run to run the query and see query results.
Create a database
Follow these steps to create a database using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Databases
-
Click on Create database.
-
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 Live Analytics will create a KMS key in your account if one does not already exist.
-
-
Click on Create database to create a database.
Create a table
Follow these steps to create a table using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Tables
-
Click on Create table.
-
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.
-
-
Click on Create table.
Run a query
Follow these steps to run queries using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Query editor
-
In the left pane, select the database created in Create a database.
-
In the left pane, select the database created in Create a table.
-
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
-
(Optional) Turn on Enable Insights to get insights about the efficiency of your queries.
Create a scheduled query
Follow these steps to create a scheduled query using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Scheduled queries.
-
Click on Create scheduled query.
-
In the Query Name and Destination Table sections, enter the following.
-
Name—Enter a query name.
-
Database name—Select the name of the database created in Create a database.
-
Table name—Select the name of the table created in Create a table.
-
-
In the Query Statement section, enter a valid query statement. Then click Validate query.
-
From Destination table model, define the model for any undefined attributes. You can use Visual builder or JSON.
-
In the Run schedule section, choose Fixed rate or Chron expression.For chron expressions, refer to Schedule Expressions for Scheduled Queries for more details on schedule expressions.
-
In the SNS topic section, enter the SNS topic that will be used to for notification.
-
In the Error log report section enter the S3 location that will be used to report errors.
Choose the Encryption key type.
-
In the Security settings section from AWS KMS key, choose the type of AWS KMS key.
Enter the IAM role that Timestream for LiveAnalytics will use to run the scheduled query. Refer to the IAM policy examples for scheduled queries for details on the required permissions and trust relationship for the role.
-
Click Create scheduled query.
Delete a scheduled query
Follow these steps to delete or disable a scheduled query using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Scheduled queries
-
Select the scheduled query created in Create a scheduled query.
-
Select Actions.
-
Choose Disable or Delete.
-
If you selected Delete, confirm the action and select Delete.
Delete a table
Follow these steps to delete a database using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Tables
-
Select the table that you created in Create a table.
-
Click Delete.
-
Type delete in the confirmation box.
Delete a database
Follow these steps to delete a database using the AWS Console:
-
Open the AWS Console
. -
In the navigation pane, choose Databases
-
Select the database that you created in Create a database.
-
Click Delete.
-
Type delete in the confirmation box.
Edit a table
Follow these steps to edit a table using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Tables
-
Select the table that you created in Create a table.
-
Click Edit
-
Edit the table details and save.
-
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.
-
Edit a database
Follow these steps to edit a database using the AWS Console.
-
Open the AWS Console
. -
In the navigation pane, choose Databases
-
Select the database that you created in Create a database.
-
Click Edit
-
Edit the database details and save.