Study guide
10.2 Auditing External & Unused Access with IAM Access Analyzer
AWS Certified Security – Specialty SCS-C03
Track your progress as you read
Finished sections get a check mark.
1 Chapter 0: Getting Started with the SCS-C03 Exam
0.1 SCS-C03 Exam Format, Domains & Study Strategy
2 Chapter 1: Security Monitoring, Alerting & Threat Detection Services
1.1 Workload Monitoring & Health Check Strategies 1.2 Amazon GuardDuty Architecture & Finding Types 1.3 AWS Security Hub & Automated Conformance Assessment 1.4 Amazon Macie & Automated Data Classification
3 Chapter 2: Enterprise Logging Architecture & Analysis
2.1 Multi-Account CloudTrail & Organization Trails 2.2 Amazon Security Lake & OCSF Log Normalization 2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs 2.4 Troubleshooting Security Telemetry & Log Ingestion 2.5 Analyzing, Normalizing & Correlating Security Logs
4 Chapter 3: Incident Readiness, Response Planning & Automated Runbooks
3.1 Incident Response Planning & Blast Radius Mitigation 3.2 Testing & Validating Incident Response Plans 3.3 Automated Incident Remediation with EventBridge & Step Functions 3.4 Systems Manager OpsCenter & Incident Manager Runbooks
5 Chapter 4: Digital Forensics, Evidence Preservation & Root Cause Analysis
4.1 Forensic Artifact Capture & Chain of Custody 4.2 Threat Containment & Network Quarantine Techniques 4.3 Correlating Events & Root Cause Analysis with Amazon Detective
6 Chapter 5: Edge Protection, WAF & DDoS Mitigation
5.1 CloudFront Security Headers & Origin Access Control 5.2 AWS WAF Architecture & Advanced Rule Sets 5.3 AWS Shield Advanced & DDoS Defense Architectures 5.4 Edge Integrations: Managed Rule Groups, OCSF Ingestion, IoT Policies & CORS
7 Chapter 6: Compute Workload Hardening, Vulnerability Management & GenAI Security
6.1 Golden AMIs & Container Image Hardening Pipelines 6.2 Amazon Inspector Vulnerability Management & Patch Automation 6.3 Generative AI Security: Amazon Bedrock Guardrails & Model Protection 6.4 Instance Profiles, Service Roles & Execution Roles for Compute 6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect
8 Chapter 7: Network Security, Segmentation, Private Connectivity & Encryption in Transit
7.1 Layered Traffic Filtering: SGs, NACLs & AWS Network Firewall 7.2 Hybrid Connectivity Security: VPN, Direct Connect & MACsec 7.3 Zero-Trust Access & Network Access Analysis 7.4 Enforcing Encryption in Transit: ELB Security Policies, TLS & HTTPS-Only Access 7.5 Private Access: VPC Endpoints, PrivateLink, Client VPN & Verified Access 7.6 Inter-Resource Encryption in Transit: Nitro, EMR, EKS & SageMaker AI
9 Chapter 8: Enterprise Authentication, Federation & Directory Services
8.1 AWS IAM Identity Center & Enterprise IdP Integration 8.2 Amazon Cognito User Pools & Identity Pools 8.3 AWS Security Token Service (STS) & Temporary Credential Workflows 8.4 Troubleshooting Identity & Authentication Failures
10 Chapter 9: Advanced Authorization Architecture & Policy Evaluation
9.1 Complete AWS Policy Evaluation Logic & Decision Flow 9.2 Permission Boundaries & Safe Admin Delegation 9.3 Attribute-Based Access Control (ABAC) with IAM Tags
11 Chapter 10: Least Privilege, Policy Validation & External Access Auditing
10.1 IAM Roles Anywhere & Amazon Verified Permissions 10.2 Auditing External & Unused Access with IAM Access Analyzer 10.3 Analyzing Authorization Failures & Policy Simulation
12 Chapter 11: Cryptographic Services: KMS Architecture & Key Governance
11.1 AWS KMS Architecture, Key Policies & Key Types 11.2 KMS Grants, Encryption Context & Multi-Region Keys 11.3 Imported Key Material (BYOK) & CloudHSM Key Stores
13 Chapter 12: Secrets Management, Sensitive Data Masking & PKI
12.1 AWS Secrets Manager & Systems Manager Parameter Store 12.2 Sensitive Data Masking in Telemetry & Messaging 12.3 AWS Certificate Manager (ACM) & Private CA Architecture
14 Chapter 13: Storage Encryption, Integrity, Lifecycle & Backup Protection
13.1 S3 Encryption Modes & S3 Bucket Keys 13.2 Data Integrity Protection: Object Lock, Vault Lock & Code Signing 13.3 Secure Data Lifecycle, Cross-Account Replication & Backup Vault Lock 13.4 Lifecycle, Backup & Secure Replication Beyond S3: EFS, FSx, DLM, DataSync & Air-Gapped Vaults
15 Chapter 14: Multi-Account Architecture, Organizations & Control Tower Governance
14.1 AWS Organizations Structure, Hierarchy & Resource Control 14.2 AWS Control Tower Landing Zone & Guardrail Framework 14.3 Delegated Administrator Architecture & Root User Governance 14.4 Centralized Resource Sharing with RAM & Service Catalog
16 Chapter 15: Compliance Automation, Infrastructure as Code Security & Auditing
15.1 Infrastructure as Code Security & Multi-Account Deployment 15.2 AWS Config, Conformance Packs & Automated Remediation 15.3 Audit Evidence Collection & Well-Architected Security Reviews
10.2 Auditing External & Unused Access with IAM Access Analyzer
Key Takeaways Explain This Topic AI
IAM Access Analyzer uses automated reasoning and mathematical logic to provably verify resource access policies, eliminating false negatives caused by complex condition blocks and multi-statement evaluations.
External access analyzers use a zone of trust (an account or the organization) and analyze resource-based policies for 15 resource types, including S3 buckets, IAM role trust policies, KMS keys, Lambda, SQS, Secrets Manager, SNS, EBS and RDS snapshots, ECR, EFS, and DynamoDB.
Archive rules automatically triage expected cross-account access findings (such as approved third-party integrations), keeping security findings focused on genuine unintended exposure.
Unused access analyzers inspect IAM users and roles against a tracking period of 1–365 days, reporting unused roles, unused access keys, unused console passwords, and unused service- and action-level permissions.
Automated policy generation analyzes AWS CloudTrail event logs over a specified time window to synthesize fine-grained least-privilege IAM policies tailored precisely to actual historical workload activity.
Last updated: September 2026
10.2 Auditing External & Unused Access with IAM Access Analyzer
Establishing and maintaining the principle of least privilege in enterprise AWS environments is an ongoing operational challenge. As multi-account environments scale, resource-based policies, role trust configurations, and cross-account delegations proliferate across thousands of workloads. Traditional security auditing mechanisms rely on pattern matching, regex scraping, or static linters. However, static linters frequently fail when evaluating complex JSON policies containing nested conditions, NotPrincipal elements, or multi-statement evaluation rules, resulting in dangerous false negatives or overwhelming alert fatigue from false positives.
AWS IAM Access Analyzer addresses this challenge by applying automated reasoning —a field of computer science that uses mathematical logic to prove security properties. Access Analyzer delivers three foundational security capabilities: continuous auditing of external access beyond designated trust boundaries, automated discovery of unused identities, stale credentials, and dormant permissions , and automated least-privilege policy generation derived directly from historical AWS CloudTrail activity.
Mathematical Foundations: Automated Reasoning vs. Heuristic Pattern Matching
Traditional cloud security posture management (CSPM) tools inspect policies using heuristic pattern matching. For example, a basic scanner searches for "Principal": "*" to flag an Amazon S3 bucket as publicly readable. However, modern enterprise policies frequently combine wildcard principals with strict condition keys: {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "AllowAccessRestrictedToCorporateOrg",
- "Effect": "Allow",
- "Principal": "*",
- "Action": "s3:GetObject",
- "Resource": "arn:aws:s3:::corp-internal-documents/*",
- "Condition": {
- "StringEquals": {
- "aws:PrincipalOrgID": "o-enterprise123"
- },
- "Bool": {
- "aws:SecureTransport": "true"
- }
- }
- }
- ]
- }
A superficial pattern matcher flags this bucket as "publicly accessible" because of the * principal, creating a false positive. Conversely, a policy with dozens of overlapping allow and deny statements might inadvertently open access to external accounts through an omitted condition—a flaw that static scanners frequently miss.
IAM Access Analyzer avoids heuristics entirely. It converts IAM policies, resource policies, permission boundaries, and condition keys into formal mathematical logic formulas using Satisfiability Modulo Theories (SMT) solvers. The automated reasoning engine mathematically proves whether a viable logical path exists for an unauthorized principal outside the defined zone of trust to access a resource. This mathematical certainty guarantees comprehensive coverage without false alarms.
External Access Analyzers: Zones of Trust & Supported Resources
An external access analyzer identifies resources within your AWS environment that have been shared with an entity outside your designated Zone of Trust .
Defining the Zone of Trust
The zone of trust defines the perimeter within which access is considered legitimate and expected:
Account-Level Analyzer : The zone of trust is restricted to the single AWS account where the analyzer is deployed. Access granted to any external AWS account, anonymous public user, or unauthenticated caller generates a finding.
Organization-Level Analyzer : The zone of trust encompasses the entire AWS Organization . Deployed via the AWS Organizations Management Account or a designated Delegated Administrator account, this analyzer monitors all member accounts. Sharing resources between member accounts inside the organization does not generate findings; findings trigger only when access is granted to an entity outside the organization.
Monitored Resource Types
External access analyzers evaluate resource-based policies for 15 resource types: S3 general purpose and directory buckets, IAM roles, KMS keys, Lambda functions and layers, SQS queues, Secrets Manager secrets, SNS topics, EBS volume snapshots, RDS DB snapshots and DB cluster snapshots, ECR repositories, EFS file systems, and DynamoDB tables and streams. The most frequently tested are:
Monitored Resource Policy Type Evaluated Example Finding Trigger
Amazon S3 Buckets S3 Bucket Policies & ACLs Bucket policy granting s3:GetObject to "Principal": "*" or an external vendor account.
IAM Roles IAM Role Trust Policies Trust policy permitting sts:AssumeRole to an external AWS account or public web identity provider.
AWS KMS Keys KMS Key Policies & Grants CMK policy allowing kms:Decrypt or kms:GenerateDataKey to external principals.
AWS Lambda Functions & Layers Lambda Resource-Based Policies Function policy allowing cross-account invocation ( lambda:InvokeFunction ) or public layer sharing.
Amazon SQS Queues SQS Queue Access Policies Queue policy permitting external accounts or anonymous callers to send or receive messages.
AWS Secrets Manager Secrets Secrets Resource Policies Secret policy allowing external accounts to execute secretsmanager:GetSecretValue .
EBS and RDS Snapshots Snapshot sharing attributes Snapshot shared with another account or made public.
DynamoDB Tables and Streams DynamoDB resource-based policies Table policy granting dynamodb:GetItem to an external account.
Internal Access Analyzers
Internal access analyzers (added in 2025) answer the opposite question: which IAM users and roles inside your organization or account can reach selected critical resources. They combine identity policies, resource policies, SCPs, RCPs, and permissions boundaries, and support S3 buckets and directory buckets, RDS DB snapshots and cluster snapshots, and DynamoDB tables and streams. Use them to find, for example, every role in the organization that can read a payroll bucket.
Loading diagram...
Findings Lifecycle and Archive Rules
When Access Analyzer detects external access, it generates a structured finding containing the affected resource ARN, the external principal, permitted actions, and matching condition keys. Findings follow a formal lifecycle:
Active : The resource policy currently allows access to an external entity outside the zone of trust.
Resolved : Access Analyzer automatically resolves the finding when the resource policy is modified to revoke the external access, or when the resource is deleted.
Archived : The access has been evaluated and confirmed as intentional by a security administrator.
To prevent operational alert fatigue from known, approved external integrations (e.g., an external auditing firm assuming a read-only role or a public S3 bucket hosting static website assets), administrators configure Archive Rules :
Archive rules specify criteria based on resource ARNs, principal ARNs, or condition keys.
Incoming findings matching the archive rule criteria are automatically marked as Archived without alerting analysts.
Existing active findings can be retroactively archived when an archive rule is created.
Findings are published to Amazon EventBridge ( detail-type: "Access Analyzer Finding" ), enabling automated integration with AWS Security Hub, PagerDuty, or Jira ticketing pipelines.
Unused Access Analyzers: Continuous Auditing of Dormant Privileges
While external access analyzers secure perimeter boundaries, enterprise environments face an equally dangerous internal threat: dormant identities and excessive unused permissions . Over time, employees change roles, infrastructure testing roles are abandoned, and developers retain broad wildcard permissions that are never exercised in production.
An Unused Access Analyzer continuously evaluates IAM identities across an organization or individual account against an Unused Access Tracking Period (configurable from 1 to 365 days, with a standard default of 90 days).
Four Types of Unused Access Findings
Unused Roles : IAM roles with no access activity during the tracking period. Dormant roles should be reviewed and deleted so attackers can't use them for lateral movement.
Unused Access Keys : IAM user access keys that have not signed a request during the tracking period.
Unused Passwords : IAM user console passwords that have not been used to sign in during the tracking period.
Unused Permissions (Service & Action Level) : Continuously compares the permissions granted in attached identity policies against actual API calls recorded in CloudTrail. If an IAM role has AmazonS3FullAccess but has only executed s3:GetObject over the past 90 days, Access Analyzer generates a finding listing all unused services (e.g., s3:DeleteBucket , s3:PutBucketPolicy ) as unused.
Auditing Mechanism Comparison
- Capability IAM Access Analyzer (Unused Access) IAM Credential Report IAM Access Advisor
- Evaluation Style Continuous automated findings engine Static, downloadable CSV report Console-based visual tab
Entities Covered IAM Users, Access Keys, Passwords & IAM Roles IAM Users, Access Keys & Passwords only Selected User, Group, Role, or OU
Granularity Action-level & Service-level permissions Credential age and login dates only Service-level last accessed date
Automation Emits real-time EventBridge events Manual API call ( GenerateCredentialReport ) Manual inspection in console
- Tracking Window Configurable (1 to 365 days) Absolute timestamps since creation/use Up to 365 days of activity
- Automated Policy Generation from CloudTrail Logs
Achieving true least privilege by manually authoring IAM policies is notoriously difficult. Developers frequently default to broad managed policies ( PowerUserAccess , AmazonEC2FullAccess ) because determining the exact set of dozens of micro-actions required by an application is time-consuming.
IAM Access Analyzer solves this through CloudTrail-Based Automated Policy Generation :
Loading diagram...
Step-by-Step Policy Generation Workflow
Run Workload in Staging : Deploy the application in a staging or integration test environment with broader permissions, and execute end-to-end regression suites and business workflows for a representative period (e.g., 30 to 60 days).
Initiate Generation ( StartPolicyGeneration ) : Through the IAM console or CLI, start a policy generation task targeting the specific IAM role. Specify the CloudTrail trail that captures management and data events, along with the date range.
Automated Log Analysis : Access Analyzer queries the CloudTrail logs stored in Amazon S3, identifying every unique API action executed by the target principal ARN and extracting the associated resource ARNs.
Review Generated Policy ( GetGeneratedPolicy ) : Access Analyzer outputs a syntactically valid JSON policy containing only the actions observed in the logs. For actions where CloudTrail cannot deterministically identify the exact resource ARN, the generated policy provides clearly marked placeholders (e.g., ${ResourceArn} ) prompting the engineer to specify the exact ARN.
Attachment & Deprecation : The generated least-privilege policy is attached as a customer managed policy, and the legacy broad policy is detached.
Specialty Exam Pitfalls & Architectural Traps
Assuming Organization Analyzers Detect Intra-Organization Cross-Account Access : An organization-level analyzer considers all member accounts within the AWS Organization to be inside the zone of trust. If an S3 bucket in the Production Account allows access to an IAM role in the Development Account, an organization analyzer will not generate a finding! To detect cross-account sharing between internal accounts, you must deploy Account-Level Analyzers .
Know the Coverage Limits : External access analyzers cover 15 resource types (including DynamoDB tables and streams, SNS topics, ECR repositories, EFS file systems, and EBS/RDS snapshots), but not every resource policy: API Gateway resource policies and Amazon OpenSearch Service domain policies, for example, are not analyzed. Unused access analyzers cover only IAM users and roles.
S3 Block Public Access Is Considered : Access Analyzer accounts for S3 Block Public Access. When Block Public Access blocks a public bucket policy, no public finding remains (a cross-account access point finding may replace it). Bucket-level settings are re-evaluated whenever a policy changes, but account-level settings only every 6 hours, so findings can lag an account-level change.
Archive Rules Do Not Modify Resource Policies : Creating an archive rule merely suppresses the finding in the Access Analyzer console and prevents future EventBridge notifications. It does not alter, restrict, or revoke the underlying resource-based policy.
Loading diagram... IAM Access Analyzer Architecture: External Access, Unused Access, and CloudTrail Policy Generation