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 Components for AWS Config

Focus mode
Query Components for AWS Config - AWS Config

The SQL SELECT query components for AWS Config advanced queries are as follows.

Synopsis

SELECT property [, ...] [ WHERE condition ] [ GROUP BY property ] [ ORDER BY property [ ASC | DESC ] [, property [ ASC | DESC ] ...] ]

Parameters

[ WHERE condition ]

Filters results according to the condition you specify.

Comparison operators

  • = (equals)

  • IN (list membership)

  • BETWEEN (range check)

Logic operators

  • AND

  • OR

  • NOT

[ GROUP BY property ]

Aggregates the result set into groups of rows with matching values for the given property.

The GROUP BY clause is applicable to aggregations.

[ ORDER BY property [ ASC | DESC ] [, property [ ASC | DESC ] ...] ]

Sorts a result set by one or more output properties.

When the clause contains multiple properties, the result set is sorted according to the first property, then according to the second property for rows that have matching values for the first property, and so on.

Examples

SELECT resourceId WHERE resourceType='AWS::EC2::Instance'
SELECT configuration.complianceType, COUNT(*) WHERE resourceType = 'AWS::Config::ResourceCompliance' GROUP BY configuration.complianceType

On this page

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