Sub topic 5
Reading external access findings
This chapter covers how to read an external access finding: which resource it names, who gets access, what they can do, and which condition applies. It assumes you can read IAM policy JSON (Effect, Principal, Action, Resource, Condition) and have created an external access analyzer as shown in the earlier chapter on creating analyzers. Finding data is read here through the AWS CLI, but the console shows the same fields.
What an external access finding tells you
An external access analyzer checks resource-based policies and similar sharing settings. It reports a finding when a policy allows a principal outside your zone of trust (the account or organization you chose when you created the analyzer). It does not report access that is only inside the zone.
Each finding answers four questions:
- Which resource is shared? The resource ARN and resource type, such as
AWS::S3::Bucket,AWS::IAM::Role,AWS::KMS::Key,AWS::Lambda::Function,AWS::SQS::Queue, orAWS::SecretsManager::Secret. - Who gets access? The external principal: another account, an IAM entity in another account, a federated identity, or everyone (
*). - What can they do? The actions the policy allows that principal.
- Under what condition? Any
Conditionin the policy that narrows the access, as far as the analyzer can evaluate it.
A fifth field, isPublic, summarizes whether the resource is open to anyone on the internet.
Where the findings come from
The analyzer uses automated reasoning on the policy rather than sending test requests. It reads the resource policy (and, for S3, bucket ACLs, access points, and the Block Public Access settings), then works out which principals the policy can allow. A new analyzer scans your resources once, then re-scans a changed policy within about 30 minutes. It also re-scans everything periodically, roughly every 24 hours.
The finding records when it was created (createdAt), last evaluated (analyzedAt), and last changed (updatedAt). If you fix a policy, wait for the next scan before you expect the finding to change to RESOLVED.
A public bucket example
This is the bucket policy from the topic plan. It grants read access to any principal:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowEveryoneRead",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example-bucket/*"
}
]
}With no condition and Block Public Access off, the analyzer reports a finding for example-bucket. Retrieve its details with get-finding-v2:
aws accessanalyzer get-finding-v2 \
--analyzer-arn arn:aws:access-analyzer:us-east-1:111122223333:analyzer/account-external \
--id FINDING_IDThe output looks like this (abridged):
{
"id": "FINDING_ID",
"findingType": "ExternalAccess",
"resource": "arn:aws:s3:::example-bucket",
"resourceType": "AWS::S3::Bucket",
"resourceOwnerAccount": "111122223333",
"status": "ACTIVE",
"createdAt": "2026-11-20T09:14:02+00:00",
"analyzedAt": "2026-11-26T08:10:44+00:00",
"findingDetails": [
{
"externalAccessDetails": {
"principal": { "AWS": "*" },
"action": ["s3:GetObject"],
"isPublic": true,
"condition": {},
"sources": [ { "type": "POLICY" } ]
}
}
]
}Notice that the finding names the bucket, not the object ARN. The Resource in the policy was example-bucket/*, but the finding attaches to the bucket that owns the policy. The principal {"AWS": "*"}, the empty condition, and isPublic: true together say "anyone can read objects."
Reading the principal
The principal field is a map of principal type to value. Common cases:
| Principal in finding | Meaning |
|---|---|
| `{"AWS": "*"}` | Any caller. Public unless a condition restricts it. |
| `{"AWS": "222233334444"}` | Any IAM entity in account 222233334444, if that account allows it. |
| `{"AWS": "arn:aws:iam::222233334444:role/etl"}` | One role in another account. |
| `{"Service": "..."}` | An AWS service principal. Usually trusted, and only reported in some cases. |
| `{"Federated": "..."}` | An identity provider, as seen in role trust policies. |
A finding that names a whole account is broader than it looks. Granting arn:aws:iam::222233334444:root trusts every identity in that account that its administrators allow. You are relying on that account's own IAM controls.
Reading the condition
A Condition can move a policy inside or outside the zone of trust. The analyzer understands a defined set of global condition keys that identify callers, including:
aws:PrincipalOrgIDandaws:PrincipalOrgPathsaws:PrincipalAccountandaws:SourceAccountaws:SourceArnandaws:SourceOrgIDaws:userid,aws:SourceVpc,aws:SourceVpce, andaws:SourceIp(the network keys can scope access to your own network)
Three outcomes are possible:
- The condition keeps access inside the zone.
Principal: "*"withaws:PrincipalOrgIDequal to your organization ID produces no finding for an organization analyzer. For an account analyzer, the organization is outside the zone, so the same policy does produce a finding. The finding's principal is*and the condition shows the org ID. - The condition narrows the external access but does not close it. A finding is still reported, and
isPublicisfalse. For example,Principal: "*"withaws:SourceIpset to a public CIDR range is not treated as fully public, but it is still external. - The condition uses a key the analyzer cannot evaluate. The analyzer treats the statement as if the condition were not narrowing the principal. Expect a broader finding than you intended.
Listing and sorting findings
Use list-findings-v2 to see all active external findings. Filter on isPublic or on resource type to start with the riskiest ones:
aws accessanalyzer list-findings-v2 \
--analyzer-arn arn:aws:access-analyzer:us-east-1:111122223333:analyzer/account-external \
--filter '{"status":{"eq":["ACTIVE"]},"isPublic":{"eq":["true"]}}' \
--query 'findings[].[resourceType,resource,status,id]' \
--output tableRun it without the isPublic filter to find cross-account sharing that is not public, and then review each principal by hand.
A reading routine
In words:
- Check
isPublic. Atruevalue jumps the queue. - Check the principal. Is the account or role one you recognize? Compare account IDs against your list of partner and vendor accounts.
- Check the actions. Read-only actions on a log bucket are a different problem from
s3:PutObjectorkms:Decrypt. - Check the condition. Does it narrow the access as intended?
- Decide: fix the policy, archive because the access is intended, or ask the owner.
Triage status and archive rules are covered in later chapters. This chapter stops at understanding what the finding says.
Resource-specific details
- S3 buckets. Findings also come from bucket ACLs, access points, and multi-Region access points. The
sourcesfield tells you which one caused it. Account-level S3 Block Public Access is taken into account, so enabling it removes public findings that come from policies. - IAM roles. The "resource policy" is the trust policy. A finding appears when a role can be assumed by an external account. Cross-account roles you built on purpose will show up here every time.
- KMS keys. Findings come from key policies and grants. A grant to another account appears as external access.
- Lambda functions. A function policy that allows another account, or
*, to invoke it. Service principals used correctly withaws:SourceArnandaws:SourceAccountconditions do not produce findings for the service itself. - Secrets Manager, SQS, SNS, EFS, ECR, snapshots. The same principal, action, and condition pattern applies.
Common errors
- Reading only the policy. The finding reflects the combined effect of the policy, ACLs, and account-level settings. Two things that change the result: Block Public Access, and service control policies or resource control policies. Reading the policy alone gives the wrong picture.
- Expecting findings from identity policies. External access findings come from resource-based sharing. An IAM user policy that allows
s3:*is not an external access finding. - Wrong analyzer scope. An account-level analyzer reports your own organization's other accounts as external. If you see findings for sibling accounts, the analyzer's zone of trust is the account, not the organization.
- Wrong Region. Analyzers are per Region. A resource in
eu-west-1is only found by an analyzer ineu-west-1. IAM roles are global but are reported in the analyzer's Region. - Fixing the policy but not waiting. The finding stays
ACTIVEuntil the next scan completes.
Exercise
A bucket policy has Principal "*" and a Condition of StringEquals on aws:PrincipalOrgID with your organization's ID. You have an account-level analyzer and an organization-level analyzer. Which analyzer reports a finding, and why?
Show answer
The account-level analyzer reports it, because its zone of trust is the single account and the rest of the organization counts as external. The organization-level analyzer reports nothing, because the condition limits access to principals in the organization, which is inside its zone of trust.
Exercise
A finding shows principal {"AWS": "*"}, an empty condition, and isPublic true for a bucket, yet your policy has a statement with an aws:SourceIp condition. What should you check first?
Show answer
Check whether the finding comes from a different statement, a bucket ACL, or an access point (see the sources field). The statement with the aws:SourceIp condition is not the cause if another statement or source grants unrestricted access.