Table: aws_inspector2_coverage_statistics - Query AWS Inspector2 Coverage Statistics using SQL
The AWS Inspector2 Coverage Statistics is a feature of the AWS Inspector service. It provides a detailed overview of your AWS resources and helps identify potential security issues. With this service, you can evaluate the security state of your applications deployed on AWS and improve their security and compliance.
Table Usage Guide
The aws_inspector2_coverage_statistics
table in Steampipe provides you with information about AWS Inspector2's coverage statistics. This table allows you as a DevOps engineer, security analyst, or other technical professional to query detailed information about the assessment targets and the number of instances they cover. You can utilize this table to gather insights on assessment targets, including their ARNs, the number of instances they cover, and other associated metadata. The schema outlines the various attributes of the coverage statistics for you, including the assessment target ARN, the instance count, and the agent ID.
Examples
Basic info
Determine the areas in which your AWS Inspector service's coverage statistics are distributed. This query can help you understand how your resources are allocated, aiding in efficient resource management.
select total_counts, counts_by_groupfrom aws_inspector2_coverage_statistics;
select total_counts, counts_by_groupfrom aws_inspector2_coverage_statistics;
Get the count of resources within a group
Determine the number of resources within a specific group in AWS Inspector to understand resource distribution and manage resource allocation more effectively.
select g ->> 'Count' as count, g ->> 'GroupKey' as group_keyfrom aws_inspector2_coverage_statistics, jsonb_array_elements(counts_by_group) as g;
select json_extract(g.value, '$.Count') as count, json_extract(g.value, '$.GroupKey') as group_keyfrom aws_inspector2_coverage_statistics, json_each(counts_by_group) as g;
Schema for aws_inspector2_coverage_statistics
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
counts_by_group | jsonb | An array with the number for each group | |
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. | |
total_counts | bigint | The total number for all groups |
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_inspector2_coverage_statistics