Learn Domain 4: Identity and Access Management (AWS SCS-C03) with Interactive Flashcards

Master key concepts in Domain 4: Identity and Access Management through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.

IAM Policies and Evaluation Logic

IAM Policies and Evaluation Logic are fundamental concepts in AWS Identity and Access Management. IAM policies are JSON documents that define permissions by specifying which actions are allowed or denied on specific AWS resources for particular principals (users, groups, or roles).

There are several policy types: **Identity-based policies** (attached to IAM users, groups, or roles), **Resource-based policies** (attached to resources like S3 buckets), **Permission boundaries** (set maximum permissions for IAM entities), **Organizations SCPs** (define maximum permissions for member accounts), and **Session policies** (limit permissions for temporary sessions).

Each policy contains statements with key elements: **Effect** (Allow/Deny), **Action** (specific API operations), **Resource** (ARNs of targeted resources), **Principal** (who the policy applies to), and optional **Condition** blocks for fine-grained control.

**IAM Policy Evaluation Logic** follows a specific order:

1. **Default Deny**: All requests are implicitly denied by default.
2. **Evaluate SCPs**: Organization Service Control Policies are checked first, filtering maximum allowed permissions.
3. **Evaluate Resource-based policies**: If a resource-based policy grants access, it can allow access even without identity-based policy permission (within the same account).
4. **Evaluate Permission Boundaries**: These cap the maximum permissions an identity-based policy can grant.
5. **Evaluate Identity-based policies**: The actual permissions attached to the principal are evaluated.
6. **Explicit Deny Always Wins**: An explicit Deny in ANY policy overrides all Allow statements.

The critical rule is: **Explicit Deny > Explicit Allow > Implicit Deny**. If any policy at any level contains an explicit Deny, the request is denied regardless of any Allow statements elsewhere.

For cross-account access, both the source account's identity-based policy AND the target account's resource-based policy must explicitly allow the action. Understanding this evaluation logic is essential for designing least-privilege access models and troubleshooting permission issues in complex AWS environments.

IAM Roles and Cross-Account Access

IAM Roles and Cross-Account Access are fundamental concepts in AWS identity and access management that enable secure delegation of permissions without sharing long-term credentials.

**IAM Roles** are AWS identities with specific permission policies that determine what actions are allowed or denied. Unlike IAM users, roles do not have permanent credentials (passwords or access keys). Instead, they provide temporary security credentials through AWS Security Token Service (STS) when assumed. Roles can be assumed by IAM users, AWS services, applications, or federated users.

Key components of an IAM Role include:
- **Trust Policy**: Defines which principals (accounts, users, or services) are allowed to assume the role.
- **Permission Policy**: Specifies what actions and resources the role grants access to.
- **Session Duration**: Configurable timeout for temporary credentials (default 1 hour, max 12 hours).

**Cross-Account Access** allows users or services in one AWS account (trusted account) to access resources in another account (trusting account). This is achieved by:

1. **Creating a role** in the trusting account with a trust policy that references the trusted account's ID.
2. **Granting assume-role permissions** to users/roles in the trusted account.
3. **Assuming the role** using `sts:AssumeRole` API call, which returns temporary credentials.

This pattern is critical for organizations managing multiple AWS accounts, enabling centralized access management, resource sharing, and least-privilege enforcement.

**Security Best Practices:**
- Use **External ID** conditions in trust policies to mitigate the confused deputy problem.
- Implement **MFA requirements** (aws:MultiFactorAuthPresent condition) for sensitive cross-account roles.
- Apply **least-privilege permissions** to roles.
- Monitor role assumption using **AWS CloudTrail** logs.
- Use **IAM Access Analyzer** to identify unintended cross-account access.
- Leverage **AWS Organizations SCPs** to restrict which accounts can assume specific roles.

Cross-account access via IAM roles is preferred over sharing credentials, as it provides auditability, temporary access, and granular control over permissions across organizational boundaries.

AWS IAM Identity Center (SSO)

AWS IAM Identity Center (formerly AWS Single Sign-On) is a centralized identity management service that enables organizations to manage workforce access to multiple AWS accounts and business applications from a single location. It is a critical topic under Domain 4 (Identity and Access Management) of the AWS Certified Security – Specialty (SCS-C02) exam.

**Key Features:**

1. **Centralized Access Management:** IAM Identity Center provides a single point to create or connect workforce identities and manage access across your entire AWS Organization. Users get a personalized user portal to access all assigned accounts and applications.

2. **Identity Sources:** It supports multiple identity sources including its own built-in identity store, Microsoft Active Directory (via AWS Managed Microsoft AD or AD Connector), and external Identity Providers (IdPs) using SAML 2.0 or SCIM for automatic provisioning.

3. **Permission Sets:** These are collections of IAM policies that define the level of access users and groups have to AWS accounts. Permission sets are assigned to users/groups and mapped to specific AWS accounts, enabling fine-grained access control.

4. **Multi-Account Access:** Deeply integrated with AWS Organizations, IAM Identity Center simplifies managing access across multiple AWS accounts without needing to configure federation for each account individually.

5. **Application Integration:** It supports pre-integrated SAML 2.0 applications (e.g., Salesforce, Microsoft 365) and custom SAML applications, enabling true single sign-on across cloud services.

6. **Temporary Credentials:** IAM Identity Center issues short-lived credentials, following security best practices by eliminating long-term access keys.

7. **MFA Support:** Built-in multi-factor authentication support enhances security posture.

**Security Best Practices:**
- Enable MFA for all users
- Use least-privilege permission sets
- Leverage attribute-based access control (ABAC)
- Monitor access via AWS CloudTrail integration

For the SCS-C02 exam, understanding how IAM Identity Center integrates with Organizations, supports federated access, and enforces least-privilege principles is essential.

Amazon Cognito

Amazon Cognito is a fully managed AWS service that provides authentication, authorization, and user management for web and mobile applications. It is a critical component within Domain 4: Identity and Access Management of the AWS Certified Security – Specialty (SCS-C02) exam.

Amazon Cognito consists of two primary components:

1. **User Pools**: These are user directories that provide sign-up and sign-in functionality. User Pools handle user registration, authentication, and account recovery. They support multi-factor authentication (MFA), password policies, and integration with external identity providers (IdPs) such as Google, Facebook, Amazon, Apple, and SAML 2.0/OIDC-based providers. Upon successful authentication, User Pools issue JSON Web Tokens (JWTs), including ID tokens, access tokens, and refresh tokens.

2. **Identity Pools (Federated Identities)**: These provide temporary AWS credentials to users, enabling them to access AWS services like S3 or DynamoDB directly. Identity Pools support both authenticated users (from User Pools or external IdPs) and unauthenticated (guest) users. They leverage AWS STS to assign IAM roles with fine-grained permissions.

Key security features include:
- **Advanced Security**: Adaptive authentication that detects risky sign-in attempts and can trigger additional verification.
- **Lambda Triggers**: Custom workflows at various stages of authentication, such as pre-sign-up validation, custom authentication challenges, and post-confirmation actions.
- **Token Management**: Short-lived tokens with configurable expiration for enhanced security.
- **Encryption**: Data encryption at rest and in transit.
- **Compliance**: Supports HIPAA, SOC, and PCI DSS compliance requirements.

For the SCS-C02 exam, understanding how Cognito integrates with API Gateway, ALB, and other AWS services is essential. Cognito authorizers can secure API Gateway endpoints, while Identity Pools enable least-privilege access to AWS resources through IAM role mapping. Knowing when to use User Pools versus Identity Pools, and how to implement secure federation patterns, is fundamental for exam success.

IAM Access Analyzer

IAM Access Analyzer is a powerful AWS service that helps you identify resources in your organization and accounts that are shared with external entities. It continuously monitors resource-based policies to detect potential unintended access, which is critical for maintaining a strong security posture.

**Key Features:**

1. **External Access Analysis:** Access Analyzer evaluates resource-based policies on services such as S3 buckets, IAM roles, KMS keys, Lambda functions, SQS queues, and Secrets Manager secrets. It identifies resources that can be accessed from outside your AWS account or organization, flagging them as "findings."

2. **Unused Access Analysis:** It can detect unused IAM roles, unused access keys, unused passwords, and unused permissions, helping you implement least-privilege access by identifying and removing unnecessary entitlements.

3. **Policy Validation:** Access Analyzer provides policy validation by checking IAM policies against AWS best practices and grammar rules, offering actionable recommendations to help you author secure and functional policies.

4. **Policy Generation:** It can generate fine-grained IAM policies based on actual access activity captured in AWS CloudTrail logs, helping you create least-privilege policies tailored to real usage patterns.

5. **Custom Policy Checks:** You can validate that policies conform to your organization's security standards before deployment using custom policy checks powered by automated reasoning.

**How It Works:**
You create an analyzer by selecting a zone of trust (either your AWS account or your entire AWS Organization). Access Analyzer uses mathematical, logic-based reasoning (called automated reasoning) to analyze all possible access paths and generate comprehensive findings.

**Integration:**
Findings can be reviewed in the AWS Console, exported via APIs, sent to AWS Security Hub for centralized monitoring, and trigger automated remediation through Amazon EventBridge.

**Exam Relevance:**
For SCS-C02, understand that Access Analyzer is essential for identifying cross-account access, enforcing least privilege, validating policies, and detecting resource exposure—all fundamental to identity and access management security.

MFA and Identity Provider Federation

Multi-Factor Authentication (MFA) adds a second verification factor beyond a password. It combines something you know with something you have or something you are. In AWS, MFA can be enabled for the root user and IAM users with virtual authenticator apps, FIDO2 passkeys or security keys, and hardware TOTP tokens. IAM Identity Center can also enforce MFA for workforce users.

For the exam, know how to require MFA through IAM policy condition keys. The key aws:MultiFactorAuthPresent can deny sensitive actions, such as deleting resources or modifying IAM, unless the session was MFA-authenticated. The key aws:MultiFactorAuthAge limits how long ago that authentication occurred. MFA Delete on versioned S3 buckets protects against accidental or malicious deletion of object versions, and only the root user can enable it. With the AWS CLI, users call sts:GetSessionToken with their MFA device serial number and token code to obtain temporary credentials. Foundational best practices include protecting the root user with MFA and avoiding root access keys. AWS Organizations also supports centralized root access management.

Identity Provider Federation lets users authenticate with an external identity system and receive temporary AWS credentials instead of long-term IAM user keys. SAML 2.0 federation integrates corporate directories such as Active Directory through AD FS, Okta, or Microsoft Entra ID. The identity provider issues a signed assertion, and STS AssumeRoleWithSAML returns short-lived credentials mapped to IAM roles. OIDC federation supports web identities and workloads, such as GitHub Actions or EKS service accounts, through AssumeRoleWithWebIdentity. Amazon Cognito identity pools broker AWS access for mobile and web application users. IAM Identity Center is the recommended approach for multi-account workforce access, using permission sets and SCIM provisioning.

Key exam topics include role trust policies that check audience and subject claims, session duration limits, and session tags for attribute-based access control (ABAC). You should also know how CloudTrail logs federated identities. Federation centralizes the identity lifecycle, reduces credential sprawl, and lets organizations enforce MFA at the identity provider.

Temporary Credentials with AWS STS

AWS Security Token Service (STS) issues short-lived, limited-privilege credentials made up of an access key ID, a secret access key, and a session token. For the SCS-C03 exam, STS is central to Domain 4 because AWS best practice favors temporary credentials over long-term IAM user access keys. Short-lived credentials limit the damage if they leak.

Key API operations include:
- AssumeRole: cross-account access, privilege elevation, and service roles.
- AssumeRoleWithSAML: federation with corporate identity providers such as Active Directory through AD FS.
- AssumeRoleWithWebIdentity: OIDC providers such as Amazon Cognito, Google, or GitHub Actions.
- GetSessionToken: MFA-protected API access for IAM users.
- GetFederationToken: custom identity broker federation.

Role sessions last from 15 minutes up to 12 hours, with a default of 1 hour. Role chaining caps sessions at 1 hour. GetSessionToken credentials can last up to 36 hours.

A role's trust policy defines who may assume it, while its permissions policies define what the session can do. Session policies passed during AssumeRole can only restrict effective permissions, because the result is the intersection of the policies and never an expansion. When granting third parties access, use the sts:ExternalId condition to prevent the confused deputy problem. Use the aws:MultiFactorAuthPresent condition to enforce MFA. Source identity and session tags support attribute-based access control (ABAC) and improve traceability in CloudTrail.

Revocation is a frequent exam topic. Issued temporary credentials cannot be individually canceled before they expire. Instead, the IAM console's "Revoke active sessions" feature attaches an inline deny policy that uses the aws:TokenIssueTime condition. This blocks every session issued before a chosen time. Changing or removing the role's permissions policies also affects existing sessions.

Many AWS services consume STS credentials automatically:
- EC2 instance profiles deliver rotating credentials through the Instance Metadata Service, where IMDSv2 is preferred.
- Lambda execution roles and ECS task roles supply credentials to workloads.
- IAM Identity Center issues temporary credentials to workforce users.

For lower latency and better resilience, use regional STS endpoints. Monitor AssumeRole events in CloudTrail to detect anomalous access patterns.

Amazon S3 Presigned URLs

Amazon S3 presigned URLs give time-limited access to specific S3 objects to users or applications that have no AWS credentials of their own. In Domain 4 (Identity and Access Management) of the SCS-C03 exam, they show how temporary, scoped delegation builds on IAM.

How they work: A principal with valid permissions, such as an IAM user, role, or federated session, uses an SDK or the AWS CLI to sign a request for one operation (for example GetObject or PutObject) on a specific bucket and key. The Signature Version 4 signature and an expiration value are embedded in the URL query string. Anyone holding the URL can perform that single operation until it expires. No new permissions are created.

Key security points:
1. Inherited permissions: The URL can never do more than the signing principal is allowed to do at the time the URL is used. If the signer loses permission, or its credentials are revoked, the URL stops working.
2. Expiration limits: With long-term IAM user access keys, the maximum validity is 7 days. With temporary credentials from an IAM role or AWS STS, the URL becomes invalid when the session ends, even if a longer expiry was requested. URLs generated in the S3 console last at most 12 hours.
3. Revocation: To invalidate a leaked URL, use "Revoke active sessions" on the signing role, which adds a deny policy based on aws:TokenIssueTime. You can also remove the signer's permissions or deactivate its access keys.
4. Restricting usage: Bucket policies can use condition keys to control how presigned URLs are used. s3:signatureAge limits URL age, s3:authType can deny REST-QUERY-STRING requests, and aws:SourceIp or aws:SourceVpce restrict where requests can come from.
5. Encryption: For SSE-KMS objects, the signer also needs the relevant AWS KMS permissions, such as kms:Decrypt for downloads or kms:GenerateDataKey for uploads.

Common exam scenarios: browser uploads of user content to private buckets, temporary sharing of private files, remediation after a URL leak, and choosing between S3 presigned URLs and CloudFront signed URLs or signed cookies. CloudFront is the better fit for broad distribution, edge caching, or access to multiple files.

Troubleshooting Authentication

Troubleshooting authentication in the SCS-C03 exam focuses on diagnosing why a principal cannot prove its identity to AWS. This differs from authorization failures, where identity is confirmed but permissions are denied. Candidates must identify root causes across IAM users, roles, federation, AWS IAM Identity Center, and Amazon Cognito.

1. Credential issues: Expired or deactivated access keys, outdated secrets after rotation, or clock skew can cause Signature Version 4 errors such as SignatureDoesNotMatch, InvalidClientTokenId, or RequestExpired. IAM credential reports and access key last-used data help verify credential status.

2. MFA problems: These include out-of-sync virtual MFA devices, a missing aws:MultiFactorAuthPresent context key, or failing to call sts:GetSessionToken with an MFA code before invoking MFA-protected APIs. Administrators can resync devices in the IAM console.

3. Role assumption failures: AssumeRole errors often stem from trust policies that omit the calling principal, a missing sts:AssumeRole permission on the caller, an incorrect ExternalId for third-party access, or a requested session duration that exceeds MaxSessionDuration. Role chaining limits sessions to one hour. Disabled regional STS endpoints can also block token issuance.

4. Federation: SAML failures include mismatched signing certificates, an incorrect audience or ACS URL, missing required attributes such as Role and RoleSessionName, and expired assertions. OIDC issues involve wrong thumbprints, client IDs, or audience claims. Browser SAML tracers help inspect assertions.

5. IAM Identity Center: Check identity source synchronization through SCIM provisioning with external IdPs such as Okta or Microsoft Entra ID. Also review permission set assignments and session settings.

6. Amazon Cognito: Investigate user pool app client settings, token expiration, unconfirmed users, and identity pool role mappings.

Key tooling: AWS CloudTrail records ConsoleLogin, AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity events, including errorCode and errorMessage fields. The aws sts get-caller-identity command confirms the active identity. The aws sts decode-authorization-message command reveals details from encoded failure messages. The IAM policy simulator helps separate authentication faults from authorization faults, enabling faster, accurate remediation.

AWS Directory Service

AWS Directory Service provides managed Microsoft Active Directory (AD) options that let organizations use directory-based identities within AWS. For the SCS-C03 exam, know its three main types and when to choose each.

AWS Managed Microsoft AD is a fully managed, highly available AD deployed across two Availability Zones in your VPC. It supports one-way or two-way forest and external trusts with on-premises AD, Group Policy, Kerberos, LDAPS, MFA through RADIUS, and seamless domain join for EC2 instances. It also powers AD-aware services such as Amazon RDS for SQL Server, FSx for Windows File Server, and WorkSpaces.

AD Connector is a proxy that forwards authentication requests to your existing on-premises AD and stores no directory data in AWS. It suits organizations that must keep identities on-premises while granting access to the AWS Management Console, WorkSpaces, or QuickSight.

Simple AD is a low-cost, Samba-based, AD-compatible directory for basic needs. It lacks trusts and MFA support.

Key security features include: integration with IAM Identity Center, so AD users and groups map to permission sets for multi-account access; console access by assigning IAM roles to directory users or groups; MFA through RADIUS; LDAPS using certificates, which ACM Private CA can issue; security groups controlling traffic to directory network interfaces; forwarding of domain controller security event logs to CloudWatch Logs; SNS notifications for directory status changes; encryption of data at rest; snapshots for recovery; fine-grained password policies; and directory sharing across accounts through AWS Organizations to centralize identity.

Exam tips: choose AD Connector when no identity data may be stored in the cloud; choose AWS Managed Microsoft AD when you need trusts, scale, or AWS-hosted AD-dependent workloads; and remember that you do not receive Domain Admin or Enterprise Admin rights. Instead, apply least privilege through the AWS Delegated Administrators groups. Cross-account sharing also helps reduce duplicate directories and the risk of inconsistent access controls.

Amazon Verified Permissions

Amazon Verified Permissions is a fully managed, fine-grained authorization service for the custom applications you build. Rather than hardcoding authorization logic into application code, developers move permission decisions to a central policy store. This improves consistency, auditability, and overall security posture. For the SCS-C03 exam, think of it as the application-layer counterpart to IAM: IAM governs access to AWS resources, while Verified Permissions governs access to resources inside your own applications.

Policies are written in Cedar, an open-source policy language created by AWS. Cedar supports role-based access control (RBAC) and attribute-based access control (ABAC). It evaluates the principal, action, resource, and context, such as IP address, time of day, or MFA status. Cedar denies by default, and an explicit forbid always overrides a permit. The language is designed for automated reasoning and formal analysis, which makes policies predictable and verifiable.

Key components include policy stores, which hold policies and a schema and are often created per application or per tenant. Schemas define entity types and attributes and enable validation, so malformed policies are rejected. Policies can be static, or they can be created from policy templates, which are reusable policies with placeholders, useful for scenarios such as sharing a specific document with a specific user.

Applications call the IsAuthorized API, or IsAuthorizedWithToken when an identity provider is involved. BatchIsAuthorized evaluates multiple requests in one call. Verified Permissions integrates with Amazon Cognito user pools and OIDC identity providers, so token claims such as groups or custom attributes can drive decisions. It can also protect Amazon API Gateway APIs through a Lambda authorizer that the service generates.

For security and governance, authorization calls are logged in AWS CloudTrail to support audit and compliance. Management access to policy stores is controlled through IAM, and data is encrypted at rest and in transit.

Exam tips: choose Verified Permissions when a scenario requires centralized, fine-grained, auditable authorization for custom applications, decoupling policy from code, multi-tenant SaaS isolation, or Cognito-based access decisions. Do not confuse it with IAM Identity Center, which provides workforce single sign-on, or AWS Verified Access, which provides zero trust access to corporate applications.

IAM Roles Anywhere

IAM Roles Anywhere lets workloads running outside AWS, such as on-premises servers, containers, IoT gateways, or applications in other clouds, obtain temporary AWS credentials by using X.509 certificates instead of long-term IAM user access keys. This supports a core SCS-C03 theme: remove static credentials and enforce least privilege.

Core components:
1. Trust anchor: Establishes trust between IAM Roles Anywhere and your certificate authority (CA). It can reference AWS Private CA or an external CA whose certificate bundle you upload.
2. Profile: Defines which IAM roles a workload may assume, the session duration, and optional session policies or managed policies that further restrict permissions.
3. IAM role: Its trust policy must allow the service principal rolesanywhere.amazonaws.com to perform sts:AssumeRole, sts:TagSession, and sts:SetSourceIdentity. Conditions can restrict access by certificate attributes, such as aws:PrincipalTag/x509Subject/CN, or by trust anchor ARN using aws:SourceArn.

How it works: The workload runs the AWS-provided credential helper, which signs a request with the workload's private key and presents its certificate to the CreateSession API. IAM Roles Anywhere validates the certificate chain against the trust anchor and checks any imported certificate revocation list (CRL). It then returns short-lived STS credentials. The credential helper plugs into the credential_process setting, so the AWS CLI and SDKs can use these credentials transparently.

Exam-relevant security practices:
- Protect private keys, ideally in HSMs or TPMs. The credential helper supports PKCS#11 and operating system certificate stores.
- Import CRLs so that compromised certificates can be revoked.
- Use condition keys on certificate subject, issuer, and SAN values to map specific identities to specific roles.
- Audit CreateSession calls with AWS CloudTrail. Configure notifications for expiring certificates and trust anchors through Amazon EventBridge and AWS Health.

Choosing the right option:
- For human users, use IAM Identity Center.
- For workloads inside AWS, use instance profiles, ECS task roles, or EKS IRSA/Pod Identity.
- For external machine workloads, use IAM Roles Anywhere.

Exam cue: When a scenario asks you to replace long-term access keys on non-AWS servers with temporary credentials based on an existing PKI, IAM Roles Anywhere is usually the answer.

ABAC and RBAC Strategies

In AWS Certified Security - Specialty (SCS-C03) Domain 4, you must design authorization strategies that scale securely. The two main models are Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC).

RBAC grants permissions based on job function. In AWS, this means creating IAM roles, IAM groups, or IAM Identity Center permission sets such as "DatabaseAdmin" or "SecurityAuditor." Each one has policies that list specific actions and resource ARNs. RBAC is intuitive and easy to audit. It also maps well to organizational charts and to AWS managed job-function policies. Its main weakness is role explosion. As teams, projects, and resources grow, you must create and update many roles and policies, and new resources often require policy edits.

ABAC grants permissions based on attributes, usually tags. Principals carry tags, which can be set on IAM users or roles, passed as session tags from a SAML or OIDC identity provider, or supplied through IAM Identity Center attributes for access control. Resources carry tags too. Policies then compare the two using condition keys such as aws:PrincipalTag, aws:ResourceTag, aws:RequestTag, and aws:TagKeys. For example, a policy can allow ec2:StartInstances only when aws:ResourceTag/Project equals ${aws:PrincipalTag/Project}.

ABAC scales well. New users and resources gain the correct access as soon as they are tagged, so you maintain fewer policies. Its main risk is tag tampering. To reduce that risk:
- Restrict who can create or modify tags using policy conditions and Service Control Policies (SCPs).
- Enforce consistent tagging with tag policies.
- Confirm that each service supports tag-based authorization.

Exam tips:
- Choose RBAC for stable, well-defined job functions and strict separation of duties.
- Choose ABAC for fast-growing environments, many projects, or when attributes come from a corporate directory.
- Combining the two is common. Use permission sets for coarse job roles and ABAC conditions for fine-grained project scoping.
- Permission boundaries, SCPs, and resource control policies cap the maximum permissions under either model.
- Least privilege remains the guiding principle in every case.

Permission Boundaries and Session Policies

Permission boundaries and session policies are advanced IAM controls that limit, rather than grant, permissions. Both matter for the SCS-C03 exam because they enforce least privilege and enable safe delegation.

Permission Boundaries: A permission boundary is a managed policy attached to an IAM user or role (not a group) that sets the maximum permissions that identity can ever have. Effective permissions are the intersection of the identity-based policies and the boundary. For example, if the boundary allows only Amazon S3 and DynamoDB, attaching AdministratorAccess still yields only S3 and DynamoDB access. A boundary never grants permissions on its own. A key use case is delegated administration. Developers can be allowed to call iam:CreateRole only when the iam:PermissionsBoundary condition key requires a specific boundary to be attached, which prevents privilege escalation. You should also deny actions that would modify or remove the boundary policy itself. Remember that a resource-based policy in the same account that names an IAM user or role session ARN as the principal can grant access beyond the boundary.

Session Policies: Session policies are inline or managed policies passed as parameters when programmatically creating a temporary session through AssumeRole, AssumeRoleWithSAML, AssumeRoleWithWebIdentity, or GetFederationToken. The resulting session permissions are the intersection of the identity-based policies of the role or user and the session policy. You can pass up to 10 managed policy ARNs plus one inline policy, subject to a packed size limit. Common use cases include letting one shared role issue scoped-down credentials per user or per task, such as a broker application that restricts each session to a specific S3 prefix.

Evaluation Logic: An explicit deny in any policy always wins. Effective access within an account is roughly the intersection of identity-based policies, permission boundaries, session policies, SCPs, and RCPs, with resource-based policies adding nuance.

Exam Tip: If a scenario asks how to safely let others create roles, choose permission boundaries. If it asks how to restrict temporary credentials for a single session, choose session policies.

Analyzing Authorization Failures

Analyzing authorization failures is a core skill in Domain 4 of the SCS-C03 exam. It means finding out why a principal was denied access to an AWS resource and fixing the problem while keeping least privilege.

Start with the IAM policy evaluation logic. A request is denied by default. An explicit Deny in any applicable policy overrides every Allow. Several policy types can be involved: identity-based policies, resource-based policies (such as S3 bucket policies or KMS key policies), permissions boundaries, session policies, Service Control Policies (SCPs), Resource Control Policies (RCPs), and VPC endpoint policies. Every applicable guardrail must permit the action. For cross-account access, both the identity policy in the calling account and the resource policy in the owning account must allow the request.

Key troubleshooting tools:
- AWS CloudTrail: Look for events with errorCode values such as AccessDenied, UnauthorizedOperation, or Client.UnauthorizedOperation. Check userIdentity, sourceIPAddress, eventSource, and errorMessage. Use CloudTrail Lake or Amazon Athena to query failures at scale.
- Enhanced AccessDenied messages: Many services now name the policy type that caused the denial, for example \"with an explicit deny in a service control policy\".
- STS DecodeAuthorizationMessage: EC2 and some other services return an encoded message. Calling sts:DecodeAuthorizationMessage reveals the matched statements and context.
- IAM Policy Simulator: Tests how identity policies, boundaries, and SCPs evaluate specific actions, resources, and condition keys.
- IAM Access Analyzer: Validates policies, flags errors, and generates least-privilege policies from CloudTrail activity.
- Last accessed data: Shows which services and actions a role actually uses.

Common root causes include missing KMS key policy grants, condition key mismatches (aws:SourceIp, aws:SourceVpce, aws:MultiFactorAuthPresent, aws:PrincipalOrgID, tag-based ABAC conditions), Region restrictions in SCPs, wrong resource ARNs (for example, bucket ARN versus object ARN), expired session credentials, and role trust policies that do not allow sts:AssumeRole.

Exam tip: When a scenario describes unexpected denials, first identify which policy layer applies, then pick the tool that exposes that layer's decision.

More Domain 4: Identity and Access Management questions
353 questions (total)
Practice questions
One session at a time, always new questions