Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Query syntax

Focus mode
Query syntax - AWS IoT Core

In fleet indexing, you use a query syntax to specify queries.

Supported features

The query syntax supports the following features:

  • Terms and phrases

  • Searching fields

  • Prefix search

  • Range search

  • Boolean operators AND, OR, NOT, and . The hyphen is used to exclude something from search results (for example, thingName:(tv* AND -plasma)).

  • Grouping

  • Field grouping

  • Escaping special characters (such as with \)

Unsupported features

The query syntax doesn't support the following features:

  • Leading wildcard search (such as "*xyz"), but searching for "*" matches all things

  • Regular expressions

  • Boosting

  • Ranking

  • Fuzzy searches

  • Proximity search

  • Sorting

  • Aggregation

  • Special characters: `, @, #, %, \, /, ', ;, and ,. Note that , is only supported in geoqueries.

Notes

A few things to note about the query language:

  • The default operator is AND. A query for "thingName:abc thingType:xyz" is equivalent to "thingName:abc AND thingType:xyz".

  • If a field isn't specified, AWS IoT searches for the term in all the registry, Device Shadow, and Device Defender fields.

  • All field names are case sensitive.

  • Search is case insensitive. Words are separated by white-space characters as defined by Java's Character.isWhitespace(int).

  • Indexing of Device Shadow data (unnamed shadows and named shadows) includes reported, desired, delta, and metadata sections.

  • Device shadow and registry versions aren't searchable, but are present in the response.

  • The maximum number of terms in a query is twelve.

  • The special character , is only supported in geoqueries.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.