Table: aws_iot_thing - Query AWS IoT Things using SQL
AWS IoT Core allows for the management and connection of Internet of Things (IoT) devices to the AWS cloud. In this service, an IoT "Thing" represents the virtual model of a physical device or asset. These things, which can range from sensors and appliances to machinery, are capable of collecting and exchanging data over the internet or other networks.
Table Usage Guide
The aws_iot_thing
table facilitates the exploration and management of AWS IoT Things. Utilize this table to access comprehensive details about each IoT Thing, including its name, ID, type, and attributes. This is particularly beneficial for IoT administrators and developers who need to oversee IoT device configurations and statuses within the AWS ecosystem.
Examples
Basic Info
Retrieve fundamental details about your AWS IoT Things. This query is crucial for a general overview of IoT Things in your environment, including their identifiers and types.
select thing_name, thing_id, arn, thing_type_name, versionfrom aws_iot_thing;
select thing_name, thing_id, arn, thing_type_name, versionfrom aws_iot_thing;
Filter Things by Attribute Name
Identify specific IoT Things based on a particular attribute name. This query is useful for segmenting IoT Things according to custom-defined criteria or characteristics.
select thing_name, thing_id, arn, thing_type_name, versionfrom aws_iot_thingwhere attribute_name = 'foo';
select thing_name, thing_id, arn, thing_type_name, versionfrom aws_iot_thingwhere attribute_name = 'foo';
List Things for a Given Type Name
Find all IoT Things that belong to a specific type. This query aids in understanding the distribution and categorization of IoT Things by type within your AWS IoT environment.
select thing_name, arn, thing_id, thing_type_name, attribute_valuefrom aws_iot_thingwhere thing_type_name = 'foo';
select thing_name, arn, thing_id, thing_type_name, attribute_valuefrom aws_iot_thingwhere thing_type_name = 'foo';
Schema for aws_iot_thing
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | The Amazon Resource Name (ARN) for the thing. | |
attribute_name | text | = | The attribute name of the thing. |
attribute_value | text | = | The attribute value for the attribute name of the thing. |
attributes | jsonb | A list of thing attributes which are name-value pairs. | |
billing_group_name | text | The name of the billing group the thing belongs to. | |
default_client_id | text | The default MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
thing_id | text | The ID of the thing to describe. | |
thing_name | text | = | The name of the thing. |
thing_type_name | text | = | The name of the thing type, if the thing has been associated with a type. |
title | text | Title of the resource. | |
version | bigint | The version of the thing record in the registry. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_iot_thing