Overview
Enable IAM Access analyzer for IAM policies about all resources in each region.
IAM Access Analyzer is a technology introduced at AWS re:Invent 2019. After the Analyzer is enabled in IAM, scan results are displayed on the console, showing the accessible resources. Scans show resources that other accounts and federated users can access, such as KMS keys and IAM roles. So the results allow you to determine if an unintended user is allowed, making it easier for administrators to monitor least privileges access. Access Analyzer analyzes only policies that are applied to resources in the same AWS Region.
AWS IAM Access Analyzer helps you identify the resources in your organization and accounts, such as Amazon S3 buckets or IAM roles, that are shared with an external entity. This lets you identify unintended access to your resources and data. IAM Access Analyzer continuously monitors all policies for S3 bucket, IAM roles, KMS(Key Management Service) keys, AWS Lambda functions, and Amazon SQS(Simple Queue Service) queues.
Remediation guidance
From Console
Perform the following to enable IAM Access analyzer for IAM policies:
- Sign into the AWS console and open the IAM Dashboard.
- In the left navigation pane, choose Access analyzer.
- Click Create analyzer.
- On the
Create analyzerpage, confirm that the region displayed is the region where you want to enable Access Analyzer. - Enter a name for the analyzer or can keep the system generated.
- Optional. add any tags that you want to apply to the analyzer.
- Choose Create analyzer.
From Command Line
Run the following command:
aws accessanalyzer create-analyzer --analyzer-name --type
Note: The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers are supported. You can create only one analyzer per account per Region. You can create up to 5 analyzers per organization per Region.
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
AWS
Use AWS Organizations guardrails, AWS Config rules or conformance packs where they fit, approved account baselines, and IaC modules so new resources inherit the secure setting.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
IAM Access analyzer is enabled for all regions
Connectors
Covered asset types
Expected check: eq []
AWS140IAM20{...AssetFragment}
AWS