CmdID / aws / aws securityhub
aws securityhub create-insight
Creates a custom insight in Security Hub CSPM. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To create a custom insight
The following create-insight example creates a custom insight named Critical role findings that returns critical findings that are related to AWS roles.
aws securityhub create-insight --filters '{"ResourceType": [{ "Comparison": "EQUALS", "Value": "AwsIamRole"}], "SeverityLabel": [{"Comparison": "EQUALS", "Value": "CRITICAL"}]}' --group-by-attribute "ResourceId" --name "Critical role findings"Identify--filtersOne or more attributes used to filter the findings included in the insight.--group-by-attributeThe attribute used to group the findings for the insight.--nameThe name of the custom insight to create.Its output
{
"InsightArn": "arn:aws:securityhub:us-west-2:123456789012:insight/123456789012/custom/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}For more information, see Managing custom insights in the AWS Security Hub User Guide.
Options
--filtersOne or more attributes used to filter the findings included in the insight.--group-by-attributeThe attribute used to group the findings for the insight.--nameThe name of the custom insight to create.