Posted On: Apr 19, 2021
Amazon Config advanced queries feature now supports pagination for queries that contain aggregate functions, such as COUNT and SUM. For example, getting the total number of resources in each Amazon Web Services account requires the COUNT aggregate function. You can now use advanced queries to get complete results for your aggregate queries through pagination, which were previously limited to 500 rows. Pagination is a technique that is used to divide large results into “pages,” where each page contains a subset of results. You can process the first page of results, then the second page, and so on.
The Amazon Config advanced query feature lets you query the current configuration state of your Amazon Web Service resources based on configuration properties. You can either select one of the sample queries or write your own custom query to retrieve information about your specific use cases. For example, by running one of the sample queries provided in the advanced query feature, you can identify all EBS volumes that are not attached to any EC2 instance.
You can get the paginated results for your aggregate queries using the Amazon Config console or API. To get started, open the Amazon Config console, and navigate to Advanced queries. You can write a query that contains an aggregate function in the query editor, and choose the Run button. You can review the results in the Output section. To get the full paginated results through API, you can use the NextToken parameter of SelectResourceConfig API.
This feature is available at no additional cost to Amazon Config customers in Amazon Web Services China (Beijing) Region, operated by Sinnet and Amazon Web Services China (Ningxia) Region, operated by NWCD. For more information about Amazon Config, see the Amazon Config webpage, Amazon Config pricing and the Amazon Config Developer Guide.