Sub topic 14
Running Access Analyzer across an organization
This chapter assumes you can create an analyzer with the CLI and read findings. It also assumes you know AWS Organizations basics: management account, member accounts, delegated administrator.
Why one analyzer per account does not scale
An account analyzer only sees its own account. With 50 accounts you would have 50 sets of findings, 50 archive rule lists, and 50 places to check. An organization analyzer solves this. It covers every account in the organization and puts all findings in one place.
The zone of trust also changes. For an organization external access analyzer, the zone of trust is the whole organization. Sharing a bucket between two member accounts is not a finding. Sharing it with an account outside the organization is.
Choose where the analyzer lives
Organization analyzers can be created in only two places:
- The management account.
- A delegated administrator account that you register for Access Analyzer.
Use a delegated administrator, typically a security tooling account. This keeps day-to-day work out of the management account.
flowchart TDDo not use the diagram block above. The real diagram follows.
Set up the delegated administrator
Run these two commands from the management account. The account ID is an example.
aws organizations enable-aws-service-access \
--service-principal access-analyzer.amazonaws.com
aws organizations register-delegated-administrator \
--account-id 222233334444 \
--service-principal access-analyzer.amazonaws.comAccess Analyzer then creates the service-linked role AWSServiceRoleForAccessAnalyzer in member accounts. It uses this role to read resource policies and IAM data. You do not manage it yourself.
Create the organization analyzers
Run these in the delegated administrator account.
aws accessanalyzer create-analyzer \
--analyzer-name org-external \
--type ORGANIZATION
aws accessanalyzer create-analyzer \
--analyzer-name org-unused \
--type ORGANIZATION_UNUSED_ACCESS \
--configuration '{"unusedAccess":{"unusedAccessAge":90}}'Two points about scope:
- Analyzers are Regional. An external access analyzer only reports resources in its own Region, so create one in each Region where you run resources.
- IAM is global. One unused access analyzer is usually enough to cover roles and users in every account.
Operate the findings
Findings from all member accounts appear in the administrator account. Each finding includes the account that owns the resource, so you can route work to the right team. Filter on that field when you query findings.
Archive rules also apply organization-wide. A rule for a known partner bucket therefore silences that bucket's finding everywhere. Keep rules narrow, for example by resource ARN or by a specific principal, so you do not hide a real problem in another account.
An EventBridge rule in the delegated administrator account receives findings for the whole organization. Send them to one notification topic, then fan out by account if needed.
Cost
External access analysis has no charge. Unused access analysis is billed per IAM role and user analyzed each month, so cost grows with the number of identities in covered accounts. Check the current Access Analyzer pricing page before enabling it everywhere. Custom policy checks are billed per call.
Exercise
Your security team wants one place to see external access findings for 40 accounts, without working in the management account. What do you set up, and where do you create the analyzer?
Show answer
Enable trusted access for access-analyzer.amazonaws.com and register a security account as the delegated administrator, both from the management account. Then, in the delegated administrator account, create an analyzer of type ORGANIZATION in each Region you use. Its zone of trust is the organization, and its findings for all member accounts appear in that one account.