Review IAM Access Analyzer configuration

Analyze external access to supported resources and make findings part of operational review.

Description

An IAM Access Analyzer external-access analyzer finds supported resource policies that allow access from outside an account or organization. An organization analyzer trusts member accounts, so review internal access separately.

Potential impact

Unnecessary sharing can go unnoticed if an analyzer is missing or its findings go unreviewed.

Remediation

Create an analyzer for each required Region and trust boundary. Document intended sharing and change the policy to remove unwanted access. Use request logs to see whether access actually occurred.

Examples

The first excerpt configures trusted service access in AWS Organizations. For an existing organization, retain any other required services in aws_service_access_principals.

Before

hcl
resource "aws_organizations_organization" "example" {
  aws_service_access_principals = ["access-analyzer.amazonaws.com"]
}

After

hcl
resource "aws_accessanalyzer_analyzer" "example" {
  depends_on    = [aws_organizations_organization.example]
  analyzer_name = "example"
  type          = "ORGANIZATION"
}

Add the second resource to create an ORGANIZATION analyzer in the target Region. Use the management account or a registered delegated administrator and check coverage in other Regions.

References