aws iot list-audit-findings
Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time period. AWS CLI reference
2 examples 8 options Its page in the AWS CLI reference
Examples
Example 1: To list all findings from an audit
The following list-audit-findings example lists all findings from an AWS IoT Device Defender audit with a specified task ID.
aws iot list-audit-findings --task-id a3aea009955e501a31b764abe1bebd3dIdentify--task-idA filter to limit results to the audit with the specified ID.Its output
{
"findings": []
}Example 2: To list findings for an audit check type
The following list-audit-findings example shows findings from AWS IoT Device Defender audits that ran between June 5, 2019 and June 19, 2019 in which devices are sharing a device certificate. When you specify a check name, you must provide a start and end time.
aws iot list-audit-findings --check-name DEVICE_CERTIFICATE_SHARED_CHECK --start-time 1559747125 --end-time 1560962028Identify--check-nameA filter to limit results to the findings for the specified audit check.--start-timeA filter to limit results to those found after the specified time.--end-timeA filter to limit results to those found before the specified time.Its output, shortened
{
"findings": [
{
"taskId": "eeef61068b0eb03c456d746c5a26ee04",
"checkName": "DEVICE_CERTIFICATE_SHARED_CHECK",
"taskStartTime": 1560161017.172,
"findingTime": 1560161017.592,
"severity": "CRITICAL",
"nonCompliantResource": {
"resourceType": "DEVICE_CERTIFICATE",
"resourceIdentifier": {
"deviceCertificateId": "b193ab7162c0fadca83246d24fa090300a1236fe58137e121b011804d8ac1d6b"
}
},
"relatedResources": [
{
"resourceType": "CLIENT_ID",
"resourceIdentifier": {
"clientId": "ZipxgAIl"
},
"additionalInfo": {
"CONNECTION_TIME": "1560086374068"
}
},
{
"resourceType": "CLIENT_ID",
"resourceIdentifier": {
"clientId": "ZipxgAIl"
},
"additionalInfo": {
… 92 more linesFor more information, see Audit Commands in the AWS IoT Developer Guide.
Options
--check-nameA filter to limit results to the findings for the specified audit check.--end-timeA filter to limit results to those found before the specified time.--list-suppressed-findingsBoolean flag indicating whether only the suppressed findings or the unsuppressed findings should be listed.--max-resultsThe maximum number of results to return at one time.--next-tokenThe token for the next set of results.--resource-identifierInformation identifying the noncompliant resource.--start-timeA filter to limit results to those found after the specified time.--task-idA filter to limit results to the audit with the specified ID.