Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Editing a custom insight
You can edit an existing custom insight to change the grouping value and filters. After
you make the changes, you can save the updates to the original insight, or save the updated
version as a new insight.
In Amazon Security Hub CSPM, custom insights can be used to collect a specific set of findings and track issues that are unique
to your environment. For background information about custom insights, see Understanding custom insights in Security Hub CSPM.
To edit a custom insight, choose your preferred method, and follow the instructions.
- Security Hub CSPM console
-
To edit a custom insight (console)
Open the Amazon Security Hub CSPM console at https://console.amazonaws.cn/securityhub/.
-
In the navigation pane, choose Insights.
-
Choose the custom insight to modify.
-
Edit the insight configuration as needed.
-
To change the attribute used to group findings in the insight:
-
To remove the existing grouping, choose the X next to the
Group by setting.
-
Choose the search box.
-
Select the attribute to use for grouping.
-
Choose Apply.
-
To remove a filter from the insight, choose the circled X
next to the filter.
-
To add a filter to the insight:
-
Choose the search box.
-
Select the attribute and value to use as a filter.
-
Choose Apply.
-
When you complete the updates, choose Save insight.
-
When prompted, do one of the following:
-
To update the existing insight to reflect your changes, choose Update
<Insight_Name>
and then choose
Save insight.
-
To create a new insight with the updates, choose Save new
insight. Enter an Insight name, and then choose
Save insight.
- Security Hub CSPM API
-
To edit a custom insight (API)
Use the UpdateInsight
operation of the Security Hub CSPM API. If you use the Amazon CLI run the
update-insight command.
To identify the custom insight that you want to update, provide the insight's Amazon Resource Name (ARN). To get the ARN
of a custom insight, use the GetInsights
operation or the get-insights command.
Update the Name
, Filters
, and GroupByAttribute
parameters as needed.
The following example updates the specified insight. This example is formatted for Linux, macOS, or Unix,
and it uses the backslash (\) line-continuation character to improve
readability.
$
aws securityhub update-insight --insight-arn "arn:aws-cn:securityhub:us-west-1:123456789012:insight/123456789012/custom/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
" --filters '{"ResourceType": [{ "Comparison": "EQUALS
", "Value": "AwsIamRole
"}], "SeverityLabel": [{"Comparison": "EQUALS
", "Value": "HIGH
"}]}' --name "High severity role findings
"
- PowerShell
-
To edit a custom insight (PowerShell)
Use the Update-SHUBInsight
cmdlet.
To identify the custom insight, provide the insight's Amazon Resource Name (ARN). To get the ARN
of a custom insight, use the Get-SHUBInsight
cmdlet.
Update the Name
, Filter
, and GroupByAttribute
parameters as needed.
Example
$Filter = @{
ResourceType = [Amazon.SecurityHub.Model.StringFilter]@{
Comparison = "EQUALS"
Value = "AwsIamRole"
}
SeverityLabel = [Amazon.SecurityHub.Model.StringFilter]@{
Comparison = "EQUALS"
Value = "HIGH"
}
}
Update-SHUBInsight -InsightArn "arn:aws:securityhub:us-west-1:123456789012:insight/123456789012/custom/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" -Filter $Filter -Name "High severity role findings"