CmdID / aws / aws accessanalyzer
aws accessanalyzer list-findings
Retrieves a list of findings generated by the specified analyzer. AWS CLI reference
1 example 5 options Its page in the AWS CLI reference
Examples
To retrieve a list of findings generated by the specified analyzer
The following list-findings 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 --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, shortened
{
"findings": [
{
"id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"principal": {
"Federated": "cognito-identity.amazonaws.com"
},
"action": [
"sts:AssumeRoleWithWebIdentity"
],
"resource": "arn:aws:iam::123456789012:role/Cognito_testpoolUnauth_Role",
"isPublic": false,
"resourceType": "AWS::IAM::Role",
"condition": {
"cognito-identity.amazonaws.com:aud": "us-west-2:a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
},
"createdAt": "2021-02-26T21:17:24.710000+00:00",
"analyzedAt": "2024-02-16T18:17:47.888000+00:00",
"updatedAt": "2021-02-26T21:17:24.710000+00:00",
"status": "ACTIVE",
"resourceOwnerAccount": "123456789012"
},
{
"id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
"principal": {
"Federated": "cognito-identity.amazonaws.com"
},
"action": [
"sts:AssumeRoleWithWebIdentity"
],
… 14 more linesFor more information, see Using AWS Identity and Access Management Access Analyzer in the AWS IAM User Guide.
Options
--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 sort order for the findings returned.