| name | cis-aws-foundations-2.18 |
| description | Ensure that IAM External Access Analyzer is enabled for all regions |
| category | cis-iam |
| version | 7.0.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","iam","access-analyzer","external-access","cross-account","resource-policies"] |
| cis_id | 2.18 |
| cis_benchmark | CIS AWS Foundations Benchmark v7.0.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-foundations-2.14","cis-aws-foundations-2.21"] |
| prerequisites | [] |
| severity_boost | {} |
Ensure that IAM External Access Analyzer is enabled for all regions
Description
Enable IAM External Access Analyzer for all resources in each active AWS region.
IAM Access Analyzer is a service that analyzes resource policies to identify resources that can be accessed from outside the account. After the analyzer is enabled, scan results are displayed in the console showing accessible resources. These results help determine whether unintended access is permitted, making it easier for administrators to monitor least privilege access. Access Analyzer analyzes only policies applied to resources within the same AWS region.
Rationale
IAM External Access Analyzer helps identify resources in your account or organization that are shared with external entities. This allows detection of unintended access to resources and data. It continuously monitors policies for services such as S3 buckets, KMS keys, Lambda functions, and SQS queues.
Impact
If IAM External Access Analyzer is not enabled, unintended external access to resources may go undetected, increasing the risk of data exposure or unauthorized access.
Audit Procedure
Using AWS Console
- Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam
- Under
Access analyzer choose Analyzer Settings
- On the
Analyzer Settings page, review the list of analyzers
- Identify analyzers where the
Finding type is External Access
- Repeat these steps for each active region, as analyzers are region-specific
Using AWS CLI
- Run the following command:
aws accessanalyzer list-analyzers --type <ACCOUNT|ORGANIZATION> --region <region_name> | grep status
-
Ensure that at least one Analyzer's status is set to ACTIVE
-
To check all regions:
for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
echo "=== $r ==="
aws accessanalyzer list-analyzers --region "" -- ACCOUNT --query --output text