CmdID

CmdID / aws / aws accessanalyzer

aws accessanalyzer list-findings-v2

Retrieves a list of findings generated by the specified analyzer. AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To retrieve a list of findings generated by the specified analyzer

The following list-findings-v2 example retrieves a list of findings generated by the specified analyzer in your AWS account. This example filters the results to include only IAM roles whose name contains Cognito.

aws accessanalyzer list-findings-v2 --analyzer-arn arn:aws:access-analyzer:us-west-2:123456789012:analyzer/ConsoleAnalyzer-account --filter '{"resource": {"contains": ["Cognito"]}, "resourceType": {"eq": ["AWS::IAM::Role"]}}'Identify
--analyzer-arnThe ARN of the analyzer to retrieve findings from.
--filterA filter to match for the findings to return.
Its output
{
    "findings": [
        {
            "analyzedAt": "2024-02-16T18:17:47.888000+00:00",
            "createdAt": "2021-02-26T21:17:24.710000+00:00",
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "resource": "arn:aws:iam::123456789012:role/Cognito_testpoolUnauth_Role",
            "resourceType": "AWS::IAM::Role",
            "resourceOwnerAccount": "123456789012",
            "status": "ACTIVE",
            "updatedAt": "2021-02-26T21:17:24.710000+00:00",
            "findingType": "ExternalAccess"
        },
        {
            "analyzedAt": "2024-02-16T18:17:47.888000+00:00",
            "createdAt": "2021-02-26T21:17:50.905000+00:00",
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "resource": "arn:aws:iam::123456789012:role/Cognito_testpoolAuth_Role",
            "resourceType": "AWS::IAM::Role",
            "resourceOwnerAccount": "123456789012",
            "status": "ACTIVE",
            "updatedAt": "2021-02-26T21:17:50.905000+00:00",
            "findingType": "ExternalAccess"
        }
    ]
}

For more information, see Using AWS Identity and Access Management Access Analyzer in the AWS IAM User Guide.

Options

5 in the AWS CLI reference
--analyzer-arnThe ARN of the analyzer to retrieve findings from.
--filterA filter to match for the findings to return.
--max-resultsThe maximum number of results to return in the response.
--next-tokenA token used for pagination of results returned.
--sortThe criteria used to sort.