End of support notice: On December 15, 2025, Amazon will end support for Amazon IoT Analytics. After December 15, 2025, you will no longer be able to access the Amazon IoT Analytics console, or Amazon IoT Analytics resources. For more information, see Amazon IoT Analytics end of support.
Access dataset content in Amazon IoT Analytics (Amazon CLI)
If your dataset contains any data, you can preview and download your SQL query results.
The examples shown here use the Amazon Command Line Interface (Amazon CLI). For more information on the Amazon CLI, see the Amazon Command Line Interface User Guide. For more information about the CLI commands available for Amazon IoT Analytics, see iotanalytics in the Amazon Command Line Interface Reference.
To access your Amazon IoT Analytics dataset results (Amazon CLI)
Run the following
get-dataset-contentcommand to view the result of your query.aws iotanalytics get-dataset-content --dataset-name my_iotsitewise_dataset-
If your dataset contains any data, then the output from
get-dataset-content, has"state": "SUCCEEDED"in thestatusfield, such as in the following example.{ "timestamp": 1508189965.746, "entries": [ { "entryName": "my_entry_name", "dataURI": "https://aws-iot-analytics-datasets-f7253800-859a-472c-aa33-e23998b31261.s3.amazonaws.com/results/f881f855-c873-49ce-abd9-b50e9611b71f.csv?X-Amz-" } ], "status": { "state": "SUCCEEDED", "reason": "A useful comment." } } The output from
get-dataset-contentincludes adataURI, which is a signed URL to the output results. It is valid for a short period of time (a few hours). Visit thedataURIURL to access your SQL query results.Note
Depending on your workflow, you might want to always call
get-dataset-contentbefore you access the content because calling this command generates a new signed URL.