aws iot get-statistics
Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To search the device index for aggregate data
The following get-statistics example returns the number of things that have a property called connectivity.connected set to false (that is, the number of devices that are not connected) in their device shadow.
aws iot get-statistics --index-name AWS_Things --query-string "connectivity.connected:false"Identify--index-nameThe name of the index to search.--query-stringThe query used to search.Its output
{
"statistics": {
"count": 6
}
}For more information, see Getting Statistics About Your Device Fleet in the AWS IoT Developer Guide.
Options
--aggregation-fieldThe aggregation field name.--index-nameThe name of the index to search.--query-stringThe query used to search.--query-versionThe version of the query used to search.