Easy ReviewSAA-C03
Design Secure Architectures90

IAM

Control AWS access with identities, temporary role credentials, policy grants and permission limits.

IAM policies decide which identities may perform actions on AWS resources. Roles provide temporary access, while trust policies, resource policies and permission limits determine how that access is granted.

The root user

Every AWS account starts with a root user: the email address and password used to create it, with complete access to everything in the account. That power makes it the most valuable credential to protect, and AWS recommends keeping it locked away for the few tasks only it can do.

How it works

  1. Sign up: the root user exists, and MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential. is enforced for it.
  2. Create an administrative user for daily work, for example in IAM Identity Center.
  3. Lock the root user away: a strong password, MFA, no access keys, and safe recovery details.
  4. Sign in as root only for root-only tasks.
  5. In AWS Organizations, the management account can remove member accounts’ root credentials altogether.

Tasks that require the root user:

Area Root-only task
Account Change a standalone account’s email, root password or root access keys; close or reopen a standalone account
IAM Restore permissions when the only administrator removed their own
Billing Activate IAM access to the Billing and Cost Management console
Amazon EC2 Register as a seller in the Reserved Instance Marketplace
Amazon S3 Enable MFA delete; edit a bucket policyA document that defines permissions or permission limits for requests. that denies all principalsThe identity making a request or receiving a permission grant.
AWS GovCloud (US) Sign up

Exam cues

  • If the question says first steps after creating an account, think enable MFA on root and create an administrative user.
  • If the question says close the account or change the root email, think root user.
  • If the question says daily administration, think an administrative user, never root.

Remember

  • Root has complete access; it can’t be limited by IAM policies in its own account.
  • MFA is enforced for root users.
  • Never create root access keys.

Trap: Most account settings, such as the account name, contact details and Regions, don’t need the root user. Only the listed tasks do.

From the AWS docs (12)
  • The AWS account root user is the single sign-in identity created with the account, with complete access to all AWS services and resources; it signs in with the email address and password used to create the account.
  • AWS strongly recommends not using the root user for everyday tasks, and using it only for tasks that require root user credentials.
  • Instead of the root user, create an administrative user for everyday tasks, such as an administrative user in IAM Identity Center.
  • MFA is enforced for the root user of all account types; the customer adds the MFA device at account creation or when prompted at sign-in.
  • Root user best practices include a strong password, MFA on sign-in, not creating access keys for the root user, and securing the account recovery mechanisms.
  • With AWS Organizations, centralized root access lets the management account remove root user credentials from member accounts; new member accounts then have no root user credentials by default.
  • Root-only account tasks include changing a standalone account's email address, root password and root access keys, closing a standalone account, reopening a closed account, and restoring permissions when the only IAM administrator revoked their own.
  • Root-only tasks also include activating IAM access to the Billing and Cost Management console, registering as a seller in the Reserved Instance Marketplace, enabling MFA delete on an S3 bucket, editing an S3 bucket policy that denies all principals, and signing up for AWS GovCloud (US).
  • AWS recommends alerting on root user sign-in and use, for example with an Amazon EventBridge rule that detects root user activity and notifies administrators through Amazon SNS.
  • The root user best practices describe the sign-in alert both as an Amazon CloudWatch Events rule that notifies the security administrator and as an Amazon EventBridge rule with Amazon SNS.
  • AWS recommends a business-managed group email address for the root user, so messages from AWS reach several people even when someone is away.
  • Each account can have up to three alternate contacts, for billing, operations and security, which can be distribution lists; the root email still receives all messages.

Users, groups, and policies

IAM controls who can do what in an AWS account. Users are identities for people, groups collect users, and policies hold the permissions. The principle of least privilegeGranting only the permissions needed for the task. decides how much those policies allow.

How it works

  1. Create identities. AWS prefers roles and IAM Identity Center users with temporary credentials; an IAM user has long-term credentials.
  2. Collect users with the same job into a group.
  3. Attach policies to the group, user or role. A policyA document that defines permissions or permission limits for requests. lists allowed or denied actions on resources.
  4. Start from AWS managed policies, then narrow them into customer managed policies that give only what each job needs.

Exam cues

  • If the question says many users need the same permissions, think IAM group, because a group policy gives its permissions to each user in the group.
  • If the question says only the permissions needed for a task, think least privilege, because it limits actions on specific resources under specific conditions.
  • If the question says a friendly IAM user sign-in URL, think account alias, because it replaces the numeric account ID in the URL.
  • If the question says store a server certificate, think AWS Certificate Manager (ACM), because it is preferred; use IAM in Regions ACM does not support.

Remember

  • Prefer temporary credentials (roles) over long-term IAM user keys.
  • For IAM users with long-term credentials, require MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential., update access keys and remove unused users and credentials.
  • An IAM user belongs to one account. Credentials: console password, access keys, both, or none yet when created through the CLI or API.

Trap: AWS managed policies do not always grant least privilege. They cover common use cases and can grant more than a specific task needs.

From the AWS docs (9)
  • An IAM user group is a collection of IAM users; policies attached to the group give its permissions to every user in it.
  • Least-privilege permissions grant only the permissions required for a task, by defining the actions allowed on specific resources under specific conditions.
  • AWS recommends starting with AWS managed policies for common use cases and moving toward least privilege with customer managed policies, because AWS managed policies may grant more than a specific use case needs.
  • AWS recommends that human users and workloads use temporary credentials, such as IAM roles, instead of IAM users with long-term passwords and access keys.
  • IAM best practices include requiring MFA for IAM users and the root user, updating access keys when long-term credentials are needed, and regularly removing unused users, roles, permissions and credentials.
  • An account alias replaces the numeric account ID in the IAM user sign-in URL with an easier name.
  • ACM is the preferred place for SSL/TLS server certificates; IAM can also store server certificates, and must be used in Regions that ACM does not support.
  • An IAM user is an identity in one AWS account with a name and credentials; you choose a console password, access keys or both, and a user created through the CLI or API starts with no credentials.
  • An IAM Action value combines a service namespace and an operation name, such as s3:GetObject; wildcards can match several operations.

Credentials and MFA

Credentials prove who is calling AWS. People sign in to the console with passwords and MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential.; programs use access keys or, better, temporary credentials from roles. Fewer long-term credentials mean less to leak.

How it works

  1. Passwords sign people in to the console. An account password policyA document that defines permissions or permission limits for requests. sets complexity and rotation for IAM users.
  2. MFA adds a device check to sign-in. Passkeys and security keys resist phishing best; authenticator apps generate time-based codes.
  3. Access keys sign CLI, SDKA programming library that helps an application call AWS service APIs. and API calls. They are long-term, so AWS prefers roles, which hand out temporary credentials.
  4. Application secrets, such as database passwords, belong in AWS Secrets Manager or Systems Manager Parameter Store, not in code.
  5. Single sign-on: IAM Identity Center signs a person in once, with MFA, to every account they are assigned.
Credential Used for Protect it with
Password Console sign-in Password policy, MFA
Access keys CLI, SDK, API calls Prefer roles; at most two per user; never share
Temporary credentials (roles) People and workloads Expire automatically
Application secrets Database passwords, API keys Secrets Manager, Parameter Store

Exam cues

  • If the question says require a second factor at sign-in, think MFA.
  • If the question says password length and rotation rules, think account password policy.
  • If the question says store and rotate database credentials, think AWS Secrets Manager.
  • If the question says one sign-in for many accounts, think IAM Identity Center.

Remember

  • Up to eight MFA devices per user; one is enough to sign in.
  • Up to two access keys per user; the secret shows only once.
  • The password policy skips the root user and access keys.
  • MFA types: passkeys and security keys, virtual MFA app, hardware TOTP token.

Trap: Rotating a password does not rotate access keys. They are separate credentials; disable or rotate keys on their own.

From the AWS docs (13)
  • Multi-factor authentication (MFA) requires a user to provide unique authentication from a device in addition to their sign-in credentials; it can protect the root user and IAM users.
  • AWS recommends phishing-resistant MFA such as passkeys and security keys, FIDO-based authenticators that resist phishing, man-in-the-middle and replay attacks better than TOTP options.
  • The root user and each IAM user can register up to eight MFA devices of any type, and need only one to sign in.
  • An account password policy sets complexity requirements and mandatory rotation periods for IAM user passwords; without one, the default AWS password policy applies.
  • The IAM password policy does not apply to the root user password or to IAM user access keys.
  • Access keys are long-term credentials, an access key ID plus a secret access key, used to sign programmatic requests to the AWS CLI or API.
  • The secret access key can be retrieved only when the key is created; if it is lost, delete the key and create a new one. A user can have at most two access keys.
  • AWS recommends temporary security credentials, such as IAM roles, instead of long-term access keys.
  • IAM Identity Center gives users MFA-protected single sign-on access to their assigned AWS accounts, with identities managed in Identity Center or a SAML 2.0 identity provider.
  • AWS Secrets Manager manages, retrieves and rotates database credentials, API keys and other secrets, replacing hard-coded credentials with a runtime call.
  • AWS Systems Manager Parameter Store securely stores, organizes and retrieves configuration data as named parameters, so applications don't hardcode values.
  • IAM supports three MFA types: passkeys and security keys (FIDO), virtual MFA apps on a phone or computer, and hardware TOTP tokens.
  • A FIDO security key is a physical device, such as a YubiKey, plugged into the computer; a hardware TOTP token is a separate device that displays a six-digit code; a virtual MFA device is an app on a phone or computer.

IAM roles basics

An IAM role gives temporary permissions to whoever is allowed to assume it, such as an AWS service, an application or a federated user.

How it works

  1. Create a role with permission policies.
  2. Say who may assume it, such as EC2 or a federated user.
  3. The identity assumes the role and gets temporary credentials.

Exam cues

  • If the question says give an AWS service or app permissions without stored keys, think an IAM role.
  • If the question says employees sign in with a corporate directory, think federationUsing authentication from an external identity system to obtain AWS access..

Remember

  • Roles use temporary credentials.
  • Federation is preferred over IAM users for people.

Trap: A role is not tied to one person and has no long-term password or keys.

From the AWS docs (5)
  • An IAM role is an identity with permissions that anyone or anything allowed can assume, such as a service or application, and it provides temporary credentials instead of long-term keys.
  • AWS recommends identity federation with temporary credentials for people, and IAM users with long-term keys only for use cases federation does not support.
  • An instance profile is the container that passes an IAM role to an EC2 instance.
  • Applications retrieve temporary role credentials from EC2 instance metadata.
  • EC2 updates temporary credentials before expiration; SDK instance profile credential providers can retrieve and refresh them.

IAM policy types and review tools

IAM offers different policyA document that defines permissions or permission limits for requests. types and tools to manage and review permissions. User groups help administrators organize users as their jobs change.

How it works

  1. Choose a policy type for the identity.
  2. Place users in groups. When someone changes jobs, remove the user from the old groups and add them to the new ones.
  3. Review credential status with the credential report, and use last accessed information to identify unused permissions.
  4. Test a simulated request with the IAM policy simulator, without sending a real request to a service.
Policy type Managed by Attachment
AWS managed AWS; customers cannot modify it Many identities
Customer managed You create and edit it Many identities
Inline You create it One user, group or role

Exam cues

  • If the question says a reusable policy you can edit, think customer managed policyA standalone identity policy reusable across several identities., because it can be attached to many identities.
  • If the question says a person changes jobs, think changing their group memberships, because an administrator can move the user from the old groups to the new ones.
  • If the question says audit users’ passwords, access keys and MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential., think credential report, because it lists their status for all account users.
  • If the question says remove unused service permissions, think last accessed information, because it shows service usage for an identity or policy.
  • If the question says test whether a request would be allowed, think policy simulator, because it evaluates a simulated request.

Remember

  • A user can belong to multiple groups; groups contain only users and cannot be nested.
  • There is no default group containing all users.
  • The policy simulator can test identity-based policies, permissions boundaries, service control policies and resource-based policies.

Trap: An AWS managed policy cannot be edited by customers. For an editable policy shared by multiple identities, use a customer managed policy.

From the AWS docs (11)
  • AWS managed policies are standalone policies created and administered by AWS; customers can't modify them, and they can be attached to many identities.
  • Customer managed policies are standalone policies that you create for specific use cases, change as often as you like, and attach to many identities.
  • An inline policy is created for a single user, group or role and keeps a strict one-to-one relationship with that identity.
  • A user group can contain many users and a user can belong to multiple groups; groups can't be nested, and no default group includes all users.
  • When a person changes jobs, an administrator can remove the user from the old groups and add them to the new ones instead of editing the user's permissions.
  • The IAM credential report lists all users in the account and the status of their passwords, access keys and MFA devices.
  • IAM last accessed information shows which services an identity or policy has actually used, to remove unused permissions and keep least privilege.
  • IAM user groups cannot be nested: a group contains only users, and one user can belong to several groups, up to an account quota.
  • The IAM policy simulator tests identity-based policies, permissions boundaries, SCPs and resource-based policies against a simulated request, without sending a real request to any service.
  • An external analyzer uses an account or organization as its zone of trust and reports supported resources shared outside it.
  • External access analysis covers resources in the analyzer Region; create analyzers in each Region with supported resources.

Identities, roles, and instance profiles

IAM identities determine who makes a request. A role supplies permissions through a temporary sessionA period of temporary access represented by credentials with an expiration time., a period during which temporary credentials are valid. An instance profileA container that passes an IAM role to an EC2 instance. connects a role to an EC2 instance so its applications can use those credentials.

How it works

  1. Set the role trust policyThe resource policy on a role that controls who may assume it. to identify who can assume it. Attach a permissions policyA policy defining the actions and resources an identity can use. for the actions and resources the application needs.
  2. Put the role in an instance profile and attach the profile to EC2. The console creates the profile for an EC2 role; CLI and API workflows create it separately.
  3. The application retrieves temporary credentials from instance metadataInformation available to applications on an EC2 instance, including its temporary role credentials., information available to software on the instance. An AWS software development kitA programming library that helps an application call AWS service APIs. (SDK) instance profile credential provider can refresh them as EC2 rotates them. The AWS CLI can also retrieve the attached role’s temporary credentials from metadata.
  4. For human access, IAM groups distribute policies to their user members. Multi-factor authenticationAuthentication that uses an additional independent factor beyond the initial sign-in credential. (MFA) adds an independent factor: a password is something known, a security key is something held, and a biometric is something inherent to the person.
  5. If an application still uses a user access key, create its replacement while the old key is active. Update every consumer, inspect usage, deactivate the old key, test, then delete it after confirming the transition.

Exam cues

  • If the question says EC2 needs AWS access without embedded keys, think role plus instance profile, because the application can retrieve refreshed temporary credentials.
  • If the question says role assumption succeeds but a read fails, think role permissions policy, because trust only authorizes assumption.

Remember

  • An instance profile contains one role. A role can be in multiple profiles.
  • A user can have at most two access keys, allowing old and replacement keys to overlap.
  • Group policies contribute to user permissions. Groups cannot be nested or named as principalsThe identity making a request or receiving a permission grant., the authenticated identities in requests.
  • Root and IAM users have separate MFA configurations.
  • A CodeArtifact token needs sts:GetServiceBearerToken and codeartifact:GetAuthorizationToken. An EC2 CloudWatch agent can use an instance role with CloudWatchAgentServerPolicy.
  • AssumeRole: one hour by default, 15 minutes up to the role maximum. Role chainingUsing one role session to assume another role.: one hour at most.

Trap: Enabling root MFA does not configure MFA for the account’s IAM users.

EC2 applications use temporary role credentials
credentials1signed request2Role in profileiEC2 applicationiS3 bucketi
  1. The instance profile exposes the role credentials through EC2 metadata.

  2. The application uses the credentials for actions permitted by the role.

Box details (3)
Role in profile

Trust controls assumption; permissions control resource access.

EC2 application

An SDK provider retrieves and refreshes credentials from instance metadata.

S3 bucket

Requests use temporary role credentials.

From the AWS docs (20)
  • A role trust policy controls who may assume the role.
  • A role permissions policy defines the actions and resources available through the role.
  • An instance profile can contain only one role; a role can appear in multiple profiles.
  • The console creates an instance profile with the same name for an EC2 role; CLI and API users create the profile separately.
  • IAM groups contain users, and users receive permissions from policies attached to their groups.
  • An IAM group cannot be a Principal in a resource policy.
  • IAM groups cannot contain other groups.
  • An IAM user can have at most two access keys.
  • To rotate without interrupting applications, create a second key while the first is active, update applications, inspect old-key usage, deactivate the old key, test, and then delete it.
  • MFA requires an additional authentication mechanism alongside sign-in credentials.
  • A password is something you know; a security key is something you have; a biometric is something you are.
  • Root and IAM users have separate credentials and MFA configurations.
  • CodeArtifact authorization-token retrieval requires both sts:GetServiceBearerToken and codeartifact:GetAuthorizationToken.
  • The CloudWatch agent on EC2 can use an instance role with CloudWatchAgentServerPolicy to publish data.
  • Instance metadata supplies information to applications on an EC2 instance, including temporary role credentials.
  • A VPC is a logically isolated virtual network.
  • An AWS account can have at most 5,000 IAM users, a quota that cannot be raised.
  • An IAM role can be attached to a running or stopped EC2 instance; an instance with a role must have it replaced to use a different one.
  • The AWS CLI running on an EC2 instance can retrieve temporary credentials from instance metadata for the IAM role attached to that instance.
  • An AssumeRole session lasts one hour by default and can be set from 15 minutes up to the role's maximum session duration; role chaining, using one role's credentials to assume another, limits the session to one hour.

Policy evaluation

IAM policyA document that defines permissions or permission limits for requests. evaluation decides whether a request has permission to perform an action on a resource. A principalThe identity making a request or receiving a permission grant. is the identity making the request. Start with the request’s action, resource and context, then find every policy that applies.

How it works

  1. Read each matching statement in the JSON policy document. Effect chooses Allow or Deny; Action names operations with a service prefixThe beginning of an S3 object key used to select a set of objects., such as s3:GetObject; Resource identifies their targets. Resource policies also name a Principal; identity policies imply their attached identity.
  2. Evaluate Condition, which compares request details with policy values. For example, DateGreaterThan and DateLessThan on aws:CurrentTime bound a permission window.
  3. Reject the request if any applicable policy explicitly denies it. Otherwise find an allow, subjectThe identity represented by a token. to permissions boundaries, sessionA period of temporary access represented by credentials with an expiration time. limits and organization policies. Missing permission is an implicit denyThe absence of an applicable policy Allow for a request..
  4. For ordinary same-account access, an identity or resource policyA policy attached to a resource that specifies which principals can access it. can grant permission. Check which principal the resource policy names. Role trust and KMS key policies have their own explicit-allow requirements.
Policy Purpose
Identity policyA policy attached to an identity to define its allowed actions. Grants actions to a user, group member or role
Resource policy Grants access to named principals
Permissions boundaryA managed policy that limits what identity policies can grant a user or role. Limits identity-policy permissions
Session policyA policy passed with a temporary session request to limit its identity-policy permissions. Limits permissions for one temporary session
Service control policyAn organization policy that limits permissions of principals in affected accounts. (SCP) Limits principals in affected accounts
Resource control policyAn organization policy that limits permissions available for resources in affected accounts. (RCP) Limits resources in affected accounts

An Amazon Resource NameAn identifier that uniquely names an AWS resource. (ARN) identifies a resource with arn:partition:service:region:account-id:resource. Some resources leave Region or account fields empty.

For resource matching, use the service’s ARN format:

Resource ARN pattern in the standard AWS partitionA separate AWS environment containing a group of Regions.
S3 bucket arn:aws:s3:::bucket-name

Billing console access also has an account setting. For pages governed by Activate IAM Access, the root user enables IAM access when needed, and the caller still needs an appropriate IAM policy. Organizations-created member accounts enable the setting by default.

Exam cues

  • If the question says several identities need the same policy, think customer managed policyA standalone identity policy reusable across several identities., because it is reusable and an edit applies to every attached identity. Inline policies belong to one identity and are deleted with it.
  • If the question says s3:GetObject is allowed but objects remain inaccessible, think resource ARN matching, because a bucket ARN differs from an object ARN. s3:ListBucket targets the bucket; object actions target object paths.
  • If the question says a Region restriction breaks a global service, think NotAction exceptions in the aws:RequestedRegion deny, because global endpoints can be outside the approved Regions.
  • If the question says developers may launch only approved machine images (AMIs), think image ARN restrictions on ec2:RunInstances, because that action supports image resource permissions and conditions such as ec2:Owner.

Remember

  • An explicit denyA matching Deny statement that overrides an Allow. wins. Root’s initial access is the exception to implicit deny, not a reason to ignore applicable controls.
  • Boundaries, session policies, SCPs and RCPs grant no permissions themselves.
  • Excluding an action from a NotAction deny does not allow it.
  • S3 bucket ARNs leave the Region and account fields empty.
  • Activating IAM billing access does not grant billing permissions by itself.

Trap: A boundary Allow cannot substitute for a policy that grants access.

From the AWS docs (25)
  • IAM identity-based policies are JSON documents containing one or more permission statements; AWS evaluates applicable policies when a principal makes a request.
  • Requests start implicitly denied, except for the account root user.
  • An applicable explicit Deny overrides Allow statements.
  • For ordinary same-account access, identity and resource policy allows combine; principal-specific limits and service-specific rules still apply.
  • Role trust policies and KMS key policies must explicitly allow access under their respective authorization rules.
  • Identity-policy permissions must also be allowed by an attached permissions boundary.
  • Applicable SCPs limit account principals and RCPs limit account resources; neither grants access.
  • A customer managed identity policy is a standalone policy reusable across users, groups and roles; changing its permissions changes the policy applied to every attached identity.
  • An inline identity policy belongs to one identity and is deleted with that identity.
  • Effect selects Allow or Deny for a policy statement.
  • Resource identifies the resources to which the operations apply, normally using ARNs.
  • Resource policies identify a Principal; identity policies imply the identity to which they are attached.
  • Condition tests request context against specified values.
  • s3:ListBucket uses the bucket ARN; object permissions use an ARN with an object key or object wildcard.
  • An Amazon Resource Name (ARN) identifies a resource using the format arn:partition:service:region:account-id:resource; the resource component is service-specific, and some resources leave the Region or account fields empty.
  • DateGreaterThan and DateLessThan with aws:CurrentTime can bound access to a time window.
  • A Deny using aws:RequestedRegion can restrict endpoint Regions; NotAction exempts listed global-service actions from that deny.
  • A Deny statement with NotAction does not grant the excluded actions.
  • ec2:RunInstances supports resource permissions on image ARNs and conditions such as ec2:Owner to restrict AMI selection.
  • An AMI supplies the software required to set up and boot an EC2 instance.
  • An IAM policy statement uses Effect, Action and Resource (or their Not forms); Condition is optional, and Principal is used in resource-based policies.
  • The aws:SourceIp condition key compares the IP address of the caller making the API request, not the IP of the resource, and works only for public IP ranges.
  • The only resource-based policy that IAM itself supports is the role trust policy, which says which principals can assume the role.
  • For Billing console pages governed by Activate IAM Access, the root user enables that account setting when needed and the caller must have suitable IAM permissions; accounts created as AWS Organizations members have the setting enabled by default.
  • S3 bucket ARNs leave the Region and owning-account fields empty, as in arn:aws:s3:::example-bucket.

Permissions boundaries and session policies

Permissions boundaries let an administrator delegate IAM management while limiting what identity policies may grant. A session policyA policy passed with a temporary session request to limit its identity-policy permissions. applies a further limit to a temporary sessionA period of temporary access represented by credentials with an expiration time.. Think of each as a filter on a grant.

How it works

  1. Attach a managed policyA standalone identity policy reusable across several identities. as the boundary of an IAM user or role. An identity-policy Allow must also be allowed by that boundary.
  2. When requesting a role or federated-user session, pass a session policy to narrow its identity-policy permissions. For AssumeRole, it intersects with the role’s permissions; for GetFederationToken, it intersects with the calling user’s policies.
  3. When delegating role creation, require iam:PermissionsBoundary to equal the approved policyA document that defines permissions or permission limits for requests. ARNAn identifier that uniquely names an AWS resource.. Prevent the delegate from removing the boundary or editing its policy to escape the restriction.
  4. Inspect resource grants separately. A policy naming a user or session directly has different implicit-deny rules from one naming a role ARN.

Exam cues

  • If the question says developers need to create roles within a central permission ceiling, think required boundary plus protection against removal and modification, because an editable ceiling can be escaped.
  • If the question says one role session should have fewer permissions, think session policy, because it narrows that session’s identity-policy grants.

Remember

  • A boundary can apply to a user or role, but not a service-linked roleA role linked to an AWS service whose trust and permissions that service defines.. It does not grant access.
  • Session policies cannot add permissions to the role’s identity policies.
  • Explicit denies still apply to direct resource-policy grants.

Trap: A boundary does not grant permissions. An identity policyA policy attached to an identity to define its allowed actions. must also allow the action.

From the AWS docs (10)
  • A permissions boundary is a managed policy that limits what identity policies can grant to an IAM user or role.
  • A permissions boundary grants nothing by itself.
  • An identity grant must overlap the boundary Allow; an explicit Deny in either blocks access.
  • Session policies passed to role or federated-user sessions limit identity-policy grants for that session.
  • AssumeRole session policies cannot add to the role identity-policy permissions.
  • GetFederationToken session permissions are limited by both the calling user policies and supplied session policies.
  • Direct same-account grants to user or session principals have different implicit-deny rules from grants to role ARNs.
  • Delegated role creation can require iam:PermissionsBoundary to equal an approved policy ARN.
  • Delegates must be prevented from removing the required boundary or changing its policy to escape its limits.
  • A permissions boundary cannot be set on a service-linked role.

Cross-account roles and resource policies

Cross-account access lets an identity in one AWS account use resources in another. A role changes the credentials used for the work. A resource policyA policy attached to a resource that specifies which principals can access it. shares a resource with the original principalThe identity making a request or receiving a permission grant..

How it works

  1. For direct resource access, give the caller an identity Allow and add a resource Allow in the owning account. AWS evaluates both sides with their applicable limits.
  2. For role access, allow sts:AssumeRole on the target role ARNAn identifier that uniquely names an AWS resource. in the caller’s identity policyA policy attached to an identity to define its allowed actions.. In the target account, create a trust policyThe resource policy on a role that controls who may assume it. that trusts the caller or its account.
  3. STS checks the assumption request and returns temporary role credentials. Subsequent requests use the role sessionA period of temporary access represented by credentials with an expiration time. permissions, without combining the original caller permissions.
  4. Use the original credentials with a resource policy when retaining those permissions matters. If the service lacks resource-policy support, use a role with the permissions required for the work.

Exam cues

  • If the question says cross-account role assumption fails, think caller permission and target trust, because both must authorize the assumption request.
  • If the question says copy across S3 accounts while retaining original access, think bucket policyA document that defines permissions or permission limits for requests. for the original principal, because a resource grant does not switch identities.
  • If the question says the service has no resource policy, think cross-account role, because its permissions can authorize the work in the target account.

Remember

  • Trusting an account delegates to its administrators; they must authorize callers.
  • Both sides of cross-account resource access must allow the request.
  • Delegation works within one AWS partitionA separate AWS environment containing a group of Regions., the separate AWS environment containing a set of Regions.
  • A Principal ARN cannot match part of a name with a wildcard.

Trap: Assuming a role does not inherently make copying impossible. The selected principal must have the permissions for all required source and destination operations. Its original grants are not automatically added.

Cross-account role assumption
Account AAccount BAssumeRole1trust check2role credentials3Calleridentity AllowiAWS STSchecks assumptioniTarget roletrust + permissionsiS3 bucketresource in Bi
  1. Account A authorizes the caller to invoke AssumeRole on the target role.

  2. The target trust policy in B allows assumption and STS issues credentials.

  3. The caller accesses the bucket with the temporary role credentials.

Box details (4)
Caller

The caller needs sts:AssumeRole on the target role.

AWS STS

STS evaluates caller permission and target trust before issuing temporary credentials.

Target role

Trust controls assumption; permissions define resource access.

S3 bucket

The request uses the assumed role session permissions.

From the AWS docs (11)
  • Cross-account resource access requires an Allow in the caller identity policy and the resource policy.
  • AWS evaluates each side of a cross-account request separately with its applicable policy limits; both evaluations must allow access.
  • A cross-account AssumeRole caller needs sts:AssumeRole permission on the target role ARN.
  • The target role trust policy must trust the caller or its account for cross-account AssumeRole.
  • Naming an AWS account principal delegates authority to that account; it does not directly authorize every identity in the account.
  • STS returns temporary credentials for the assumed role session.
  • Using an assumed role means using its permissions rather than adding the original caller permissions.
  • A resource-based cross-account grant lets the original principal retain its permissions while accessing the shared resource.
  • Direct sharing needs resource-policy support; a role can provide access to services that lack it.
  • Cross-account roles and resource policies delegate access only within the same AWS partition.
  • A Principal ARN cannot use a wildcard to match only part of a principal name or ARN.

SAML and OIDC federation

FederationUsing authentication from an external identity system to obtain AWS access. lets an identity providerA system that authenticates identities and supplies evidence of that authentication., the system that authenticates a person or workload, supply evidence that AWS exchanges for temporary credentials. SAMLA standard for exchanging identity authentication assertions between systems. uses an assertionA signed identity-provider statement used as evidence of authentication., a signed statement about authentication. OpenID ConnectAn identity standard whose provider tokens can be exchanged for AWS role credentials. (OIDC) uses a token describing the authenticated subjectThe identity represented by a token..

How it works

  1. Configure the provider and a role trust policyThe resource policy on a role that controls who may assume it.. For direct IAM SAML federation, upload the provider metadata into IAM and create the trusted role with its permissions.
  2. Authenticate with the provider. Exchange the SAML assertion through AssumeRoleWithSAML, or an OIDC token through AssumeRoleWithWebIdentity. These calls do not require AWS access keys for authentication.
  3. For SAML console access, post the assertion to the AWS sign-in endpoint. It requests temporary credentials on the user’s behalf and redirects the browser to the console.
  4. Restrict OIDC trust to the provider and appropriate claimsA named field in an identity token that describes its subject or authentication context., the fields in the token. aud is its intended audienceThe intended recipient identified by an identity token.; sub is its subject. For GitHub Actions, restrict aud to sts.amazonaws.com and sub to approved repositories or branches.
  5. Use the returned temporary role credentials for AWS requests. For application users, including guests, a Cognito identity pool can provide credentials controlled by IAM roles.
Input or need STS operation
SAML assertion AssumeRoleWithSAML
OIDC token AssumeRoleWithWebIdentity
Custom broker holding IAM user credentials GetFederationToken
IAM user needs MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential. temporary credentials GetSessionToken

Exam cues

  • If the question says external CI needs access without stored AWS keys, think OIDC role federation, because its token can be exchanged for temporary credentials.
  • If the question says workforce authentication already produces SAML assertions, think SAML role federation, because AWS can use that identity evidence without a separate IAM user for each person.
  • If the question says mobile or web users include guests who need limited AWS access, think Cognito identity pool, because it supplies role-controlled temporary AWS credentials.

Remember

  • For centrally managed workforce access to multiple accounts, consider IAM Identity Center.
  • SAML console federation uses the AWS sign-in endpoint.
  • IAM rejects GitHub trust policies whose token.actions.githubusercontent.com:sub is absent, null or solely a wildcard.

Trap: A shared OIDC provider alone does not restrict access to your repository. Scope the audience and subject.

Provider evidence becomes AWS role credentials
evidence1role credentials2Identity provideriAWS STSiS3 bucketi
  1. Exchange provider evidence through the matching STS operation.

  2. The application uses the returned role credentials to access permitted AWS resources.

Box details (3)
Identity provider

The provider authenticates the identity and issues a SAML assertion or OIDC token.

AWS STS

AssumeRoleWithSAML or AssumeRoleWithWebIdentity checks the role trust.

S3 bucket

Requests use temporary role credentials and are subject to role permissions.

SAML sign-in to the console
12BrowserIdP assertionAWS sign-inRequests STS credentialsAWS console
  1. The browser posts the identity provider's SAML assertion to AWS sign-in.

  2. AWS sign-in obtains temporary role credentials and redirects the browser to the console.

From the AWS docs (16)
  • Federation lets externally authenticated identities access AWS through roles without creating an IAM user for each identity.
  • A SAML identity provider authenticates a user and issues an assertion; AssumeRoleWithSAML exchanges it for temporary role credentials.
  • AssumeRoleWithSAML does not require AWS credentials to authenticate the call.
  • OIDC federation exchanges an identity-provider token for temporary role credentials using AssumeRoleWithWebIdentity.
  • AssumeRoleWithWebIdentity does not require the caller to possess AWS security credentials.
  • A GitHub OIDC role trust policy names the IAM provider and restricts aud to sts.amazonaws.com and sub to approved repositories or branches.
  • IAM rejects creation or update of a GitHub trust policy if token.actions.githubusercontent.com:sub is absent, null, or solely a wildcard.
  • GetFederationToken supports a custom broker using an IAM user long-term credentials.
  • GetSessionToken returns credentials based on the calling user permissions and can include MFA authentication information.
  • Cognito identity pools issue temporary AWS credentials for authenticated or guest application users with access defined by IAM roles.
  • For direct IAM SAML federation, upload provider metadata into IAM and create a role that trusts that provider with suitable permissions.
  • In OIDC trust, aud identifies the intended audience and sub identifies the subject represented by the token.
  • AWS recommends IAM Identity Center for centrally managing human access to multiple accounts.
  • If an identity store is not compatible with SAML 2.0, a custom identity broker application can authenticate users, request temporary credentials from AWS STS and hand them to the users.
  • AssumeRoleWithSAML defaults to a one-hour session; a requested duration starts at 15 minutes and is bounded by the role maximum and the assertion session limit.
  • For SAML console federation, the browser posts the identity provider assertion to the AWS sign-in endpoint, which obtains temporary role credentials and redirects the browser through a console sign-in URL.

External ID and MFA conditions

External IDsA customer-specific value checked when a vendor assumes a customer role. distinguish a vendor’s customers during role assumption. They address the confused deputyA trusted service tricked into using its authority for someone other than the intended customer. problem, where someone tricks a service with legitimate authority into using it for the wrong customer. MFAAuthentication that uses an additional independent factor beyond the initial sign-in credential. conditions require extra authentication before sensitive access.

How it works

  1. A vendor that serves several customers assigns each a unique external ID. The customer role trusts the vendor principalThe identity making a request or receiving a permission grant. and requires a matching sts:ExternalId.
  2. The vendor calls AssumeRole with that customer’s ExternalId. The condition ties the request to the customer context; the value is not an AWS secret.
  3. For an IAM user requiring MFA, the role trust policyThe resource policy on a role that controls who may assume it. can require aws:MultiFactorAuthPresent to be true. The caller supplies SerialNumber and TokenCode to AssumeRole.

Exam cues

  • If the question says a vendor can be confused between its customers, think unique customer external ID in role trust, because trusting the vendor account alone does not identify its customer context.
  • If the question says an IAM user must use MFA before assumption, think trust-policy MFA condition, because the assumption must satisfy that condition.
  • If the question says deny non-MFA access including long-term keys, think Deny with BoolIfExists and aws:MultiFactorAuthPresent: false, because long-term key requests omit the key.

Remember

  • External IDs are not passwords or secrets.
  • aws:MultiFactorAuthPresent is absent for long-term keys and federated identities. Do not assume an external provider’s MFA populates this IAM key.

Trap: A condition that only matches an existing false MFA value does not catch a request where the key is absent.

From the AWS docs (8)
  • An external ID helps prevent a vendor serving multiple customers from being tricked into using its authority for the wrong customer, the confused deputy problem.
  • The vendor assigns a unique external ID per customer and includes the correct value in AssumeRole requests.
  • The customer trust policy requires the vendor principal and checks sts:ExternalId.
  • AWS does not treat an external ID as a secret.
  • A role trust policy can require Bool aws:MultiFactorAuthPresent true for MFA-authenticated AssumeRole.
  • For MFA with AssumeRole, the caller supplies SerialNumber for the device and TokenCode for its one-time code.
  • aws:MultiFactorAuthPresent is absent for long-term access-key requests and is not provided for federated identities.
  • A Deny with BoolIfExists aws:MultiFactorAuthPresent false rejects non-MFA temporary requests and long-term access-key requests.

RBAC and ABAC

Role-based access controlAuthorization based on a person's job function. (RBAC) assigns permissions by job function. Attribute-based access controlAuthorization based on attributes such as matching principal and resource tags. (ABAC) uses attributes, represented as key-value tagsA key-value label used to describe an identity or resource. in AWS. A tag such as project=payments can connect an identity’s access to the resources it should use.

How it works

  1. With RBAC, attach the policies for each job function to the relevant identities. With ABAC, define a comparison between principalThe identity making a request or receiving a permission grant. attributes and resource attributes.
  2. For supported operations, compare aws:PrincipalTag/project with aws:ResourceTag/project, or the service’s supported resource-tag key. Check support for the selected service and action.
  3. A SAMLA standard for exchanging identity authentication assertions between systems. or OIDCAn identity standard whose provider tokens can be exchanged for AWS role credentials. provider can pass identity attributes as session tagsA temporary key-value attribute passed into a session for access-control decisions..

Exam cues

  • If the question says project resources grow frequently, think ABAC tag matching, because matching resources can be covered without listing each new ARNAn identifier that uniquely names an AWS resource..
  • If the question says each IAM user gets an S3 home path, think a policy variableA placeholder resolved from request context when a policy is evaluated. such as ${aws:username} in the object ARN plus s3:prefix on s3:ListBucket, because listing and object access use different resource scopes.
  • If the question says federated role access fails with that home-path policyA document that defines permissions or permission limits for requests., think unavailable aws:username, because a role request does not have that IAM user attribute.

Remember

  • A job function in RBAC is not the same thing as an IAM role.
  • Provider attributes can become temporary session tags.

Trap: ABAC works only where the service and action support the tag conditions you use.

From the AWS docs (8)
  • Role-based access control defines permissions by job function and attaches the corresponding policies to identities.
  • Attribute-based access control can authorize supported operations when principal and resource tags match.
  • Use aws:PrincipalTag/tag-key and the supported resource-tag condition key to compare principal and resource attributes.
  • ABAC requires the selected service and action to support the relevant tag conditions.
  • SAML and OIDC providers can pass identity attributes as STS session tags.
  • An IAM user home-directory policy can use ${aws:username} in S3 object ARNs and s3:prefix conditions on s3:ListBucket.
  • The aws:username variable is unavailable for IAM role requests, so that user home-directory example does not work unchanged for roles.
  • A permission set is a collection of IAM policies used to assign account access in IAM Identity Center.

Access Analyzer

IAM Access Analyzer helps identify who can access resources, which access is unused, and how a policyA document that defines permissions or permission limits for requests. changes permissions. Its findingsA report of access identified by an analyzer for review. guide a permission review; external findings describe what policy permits, not proof that anyone used that permission.

How it works

  1. Choose the analysis scope. A zone of trustThe account or organization treated as trusted by an external access analyzer. is the account or organization considered trusted for external analysis. Findings describe supported resources shared outside that zone.
  2. Choose external, internal or unused analysis based on the question below.
  3. During policy authoring, run validation for grammar and AWS best practices.
  4. To reduce an existing user or role policy, select a CloudTrail trail and an analysis window. Provide a service roleA role an AWS service assumes to perform work for a customer. for log access, generate a template, then review its resources, conditions and missing permissions before attaching it.
Analysis Question answered
External Which supported resources are shared outside the trusted account or organization?
Internal Which internal principalsThe identity making a request or receiving a permission grant. can access selected supported resources?
Unused Which roles, credentials, services or actions have unused access?

Exam cues

  • If the question says find resources shared outside an organization, think external analyzer with an organization zone of trust, because its findings describe external policy grants.
  • If the question says build a narrower policy from application activity, think policy generation from CloudTrail, because the template uses observed services and actions.

Remember

  • Policy generation can review up to ninety days of events.
  • Generation needs a trail and a service role with log access.

Trap: A generated policy is a template to review. Missing actions can reflect generation limits or an unobserved operation.

From the AWS docs (11)
  • IAM Access Analyzer evaluates access policies and provides external, internal and unused access analysis.
  • Internal access analysis identifies principals inside the account or organization that can access selected supported resources.
  • Unused access findings identify unused roles, user access keys, passwords, services and actions.
  • Policy validation checks grammar and AWS best practices and returns errors, security warnings, warnings and suggestions.
  • Custom policy checks can compare with a reference policy for new access, check specified actions or resources, or check for public access.
  • Policy generation creates a policy template from a user or role CloudTrail activity, which the author reviews and customizes.
  • Policy generation can analyze a specified period of up to ninety days of CloudTrail events.
  • Policy generation requires a CloudTrail trail and a service role that permits access to its logs and required access information.
  • Policy generation does not identify action-level activity for data events such as S3 object data events.
  • Generated policies omit iam:PassRole because it is not a CloudTrail API action.
  • External findings describe policy-granted access; they do not prove a principal actually exercised that access.

Flashcards

tap to flip
Answer

·

All 90 cards as a list

What is the AWS account root user, and when should it be used?

The identity created with the account, with complete access to everything in it. Use it only for the few tasks that require root credentials, never for daily work.

Name four ways to protect the AWS account root user.

  • A strong password
  • MFA on sign-in
  • No access keys for the root user
  • Daily work done by an administrative user instead

The only IAM administrator in a standalone AWS account removed their own permissions by mistake. Who can restore them?

The root user. Restoring IAM user permissions in that case is a root-only task.

Which identity must close a standalone AWS account that is not in AWS Organizations?

The root user.

Which of these tasks requires the AWS account root user: creating an IAM user, enabling MFA delete on an S3 bucket, or launching an EC2 instance?

Enabling MFA delete on an S3 bucket. The others work with IAM permissions.

What kind of email address does AWS recommend for a business account's root user?

A business-managed group email address so AWS messages reach multiple people.

Should a team create access keys for the AWS account root user so scripts can run with full access?

No. AWS recommends never creating root access keys; scripts should use roles with least-privilege permissions.

A security team wants a notification whenever someone signs in as the AWS account root user. What can it set up?

An Amazon EventBridge rule on root user activity recorded by CloudTrail, sending the alert through Amazon SNS.

Which AWS services can notify a security team when the AWS account root user signs in?

A CloudWatch Events (EventBridge) rule that matches root user sign-in, with an Amazon SNS notification.

How can an AWS account owner protect the root user credentials?

Use a strong password and multi-factor authentication, avoid root access keys and secure account recovery mechanisms.

Ten developers need the same permissions in AWS. What is the simplest way to manage them in IAM?

Put the developers in an IAM user group and attach the policy to the group. Every user in it gets the permissions.

What does the principle of least privilege mean for IAM permissions?

Grant only the permissions a task needs, on specific resources and under specific conditions.

Do AWS managed policies always give least-privilege permissions?

No. They cover common use cases and may grant more than a specific task needs. Move to customer managed policies for least privilege.

Which IAM best practices apply when a company still needs IAM users with long-term credentials?

Require MFA, update (rotate) their access keys, and regularly remove unused users and credentials.

How can an administrator give the same IAM permissions to several users?

Attach a policy to an IAM user group. Its permissions apply to every user in the group.

What does least privilege mean when granting IAM permissions?

Give only the permissions needed for the task, scoped to the relevant actions, resources and conditions.

Does every IAM user need a console password?

No. An IAM user can have a console password, access keys or both.

A user created through the CLI or API starts with no credentials.

An IAM author needs to recognize an operation such as s3:GetObject and the scope of s3:*. What do these Action values mean?

s3:GetObject names a service and an operation. s3:* matches the actions in that service namespace.

What does multi-factor authentication (MFA) add to an AWS sign-in?

A second proof from a device the user has, such as a passkey, security key or authenticator app, on top of the password.

Which type of MFA does AWS recommend as the most secure?

Phishing-resistant MFA such as passkeys and security keys (FIDO), which resist phishing, man-in-the-middle and replay attacks.

A company wants IAM user passwords to have at least 14 characters and expire every 90 days. What does it configure?

An account password policy in IAM.

Does the IAM account password policy also apply to the root user's password?

No. It applies to IAM user passwords only, not the root user password or access keys.

What are AWS access keys used for, and what are their two parts?

They sign programmatic requests from the AWS CLI, SDKs or API. They have an access key ID and a secret access key.

What does AWS recommend using for AWS access instead of long-term access keys?

Temporary security credentials, such as IAM roles.

A company wants employees to sign in once and reach several AWS accounts with MFA. Which AWS service provides this?

AWS IAM Identity Center, which gives MFA-protected single sign-on to assigned accounts.

Where should an application store database passwords and API keys instead of hardcoding them?

In AWS Secrets Manager, which can also rotate them, or in AWS Systems Manager Parameter Store. The application reads them at run time.

Which MFA types does IAM support, and which one needs no extra hardware?

Passkeys and security keys, virtual MFA apps, and hardware TOTP tokens. A virtual MFA app runs on an existing phone or computer.

How does multi-factor authentication (MFA) help protect an AWS root or IAM user?

MFA requires authentication from a device in addition to sign-in credentials.

An application on EC2 needs to read from S3. What is the recommended way to give it permissions?

Attach an IAM role to the instance, so the app gets temporary credentials instead of stored access keys.

Employees already sign in to a corporate identity provider. How should they get access to AWS?

Through identity federation, which gives them temporary credentials by assuming roles, instead of creating IAM users.

An EC2 application needs AWS credentials without storing access keys in its machine image. What should the team attach?

An IAM role through an instance profile. Use an SDK instance profile credential provider to retrieve and refresh temporary credentials.

What are the three kinds of identity-based policies in IAM?

  • AWS managed: created and maintained by AWS, can't be edited
  • Customer managed: you create and edit them, reusable
  • Inline: embedded in one user, group or role

A company needs a reusable policy it can edit, attached to several roles. Which IAM policy type fits?

A customer managed policy.

Can one IAM user group contain another group?

No. Groups can't be nested; they contain only users.

An employee moves from the support team to the finance team. How should an administrator change the employee's IAM permissions?

Remove the user from the support group and add them to the finance group, instead of editing the user's own permissions.

An auditor needs a list of all IAM users with the status of their passwords, access keys and MFA. Which IAM feature provides it?

The IAM credential report.

An administrator wants to see which permitted services an IAM role never uses, to trim its permissions. Which IAM feature helps?

IAM last accessed information, which shows when each service was last used.

Which is true of IAM user groups: they can be nested, a user can be in several groups, or every account has a default group with all users?

A user can belong to several groups. Groups cannot be nested, and there is no default group that holds every user.

Which IAM feature tests whether policies would allow an action without making the real request?

The IAM policy simulator. It evaluates identity-based policies, permissions boundaries, SCPs and resource-based policies against a simulated request.

A security team wants to find supported AWS resources shared outside its account or organization. What should it configure?

IAM Access Analyzer external access analyzers, using that account or organization as the zone of trust, in each Region with supported resources.

Does an IAM role trust policy grant the resulting session permission to read application data?

No. It controls who can assume the role. The role permissions policy defines its resource permissions.

A vendor can assume an IAM role but cannot read the required data. Which role policy defines resource access?

The role permissions policy. Successful role assumption only establishes that its trust policy allowed the caller.

An application still uses an IAM user access key. How can the team rotate the key without interrupting access?

Create the second key, update applications, inspect old-key usage, deactivate the old key, test the new key, and delete the old key after confirming the migration.

Can an IAM group contain another group or be named as Principal in an S3 bucket policy?

No. Groups contain users and distribute identity-policy permissions; they are not authenticated principals.

Why does enabling MFA on the AWS root user not enable MFA for every IAM user?

Root and IAM users have separate MFA configurations. Each identity needs its own additional authentication factor.

In AWS MFA, what distinguishes a password from a security key or biometric?

A password is a knowledge factor; a security key is a possession factor; a biometric is an inherence factor. MFA combines factors.

An app has 2 million customers who need AWS access. Should each get an IAM user?

No. An account allows at most 5,000 IAM users; use federation or Amazon Cognito for customer identities.

An application on a running EC2 instance now needs S3 access, and the instance has no IAM role. Must it be relaunched?

No. Attach an IAM role (through an instance profile) to the running instance. An existing role would be replaced, not stacked.

A script uses the AWS CLI on Amazon EC2 and needs AWS permissions without storing long-term access keys. How can it obtain credentials?

Use the instance's attached IAM role. The AWS CLI can retrieve its temporary credentials from instance metadata.

An application assumes IAM role A, then uses those credentials to assume role B with a four-hour session request. How long can the role B session last?

One hour. Role chaining limits the session to one hour, whatever the role's maximum session duration.

What wins when IAM finds both an Allow and an applicable explicit Deny for a request?

The explicit Deny wins. Otherwise the applicable policy types must grant access within their limits; an absent allow is an implicit deny.

An IAM user has an identity policy allowing S3 reads in its account, and the bucket policy also allows that user. No applicable policy denies or limits the read. What is the result?

Allowed. Same-account identity and resource allows combine, subject to the relevant limits and service rules.

An IAM role has an identity Allow for an action, but its permissions boundary omits that action. Can an identity-policy grant authorize it?

No. Identity-policy permissions are limited to the intersection with the boundary and applicable organization policies.

A team wants one IAM policy reused by several roles. Should it create managed or inline policies?

A managed policy. An inline policy belongs to only one identity and is deleted with it.

An IAM policy allows s3:GetObject only on a bucket ARN without an object path. Does that resource match objects?

No. Object actions need object ARNs, such as arn:aws:s3:::example-bucket/*; s3:ListBucket uses the bucket ARN.

An IAM permission should work only within an approved time window. Which conditions express the window?

DateGreaterThan and DateLessThan on aws:CurrentTime.

A Region deny policy blocks IAM administration through its global endpoint. What should the author review?

Use NotAction exceptions for the required global-service actions in the aws:RequestedRegion deny. Separate policies must still allow those actions.

A team permits EC2 launches but wants to restrict the machine images developers use. What IAM mechanism applies?

Scope ec2:RunInstances permissions to approved image ARNs, or use supported conditions such as ec2:Owner. An AMI is the image used to launch an instance.

Which element of an IAM identity-based policy statement is optional: Effect, Action, Resource or Condition?

Condition. Effect, Action and Resource define the statement; Principal appears in resource-based policies.

A policy allows ec2:RunInstances with the condition aws:SourceIp 34.50.31.0/24. What does that limit?

Where the API call comes from. The caller must send the request from an address in that range; it says nothing about the IP addresses of the launched instances.

Which resource-based policy does the IAM service support?

Only the role trust policy, which names the principals that may assume the role.

When an IAM policy scopes access to an AWS resource, which components does its ARN identify?

The partition, service, Region, owning account and resource. The format is arn:partition:service:region:account-id:resource; some resource types leave Region or account fields empty.

An IAM role has billing permissions but cannot open Billing console pages governed by Activate IAM Access. What account setting should the administrator check?

Activate IAM Access. The root user enables the setting when needed; the role also needs appropriate IAM permissions. Organizations-created member accounts enable the setting by default.

A team edits a customer managed IAM policy shared by several roles. Which roles receive the revised policy permissions?

Every role to which that customer managed policy is attached. They share the same standalone policy.

What document structure defines the permissions in an IAM identity-based policy?

A JSON document with one or more permission statements. AWS evaluates applicable policies for each request.

An IAM author writes an Amazon S3 bucket ARN. Should its Region and account ID appear between the service and bucket name?

No. Those fields are empty: arn:aws:s3:::bucket-name.

A team wants to cap the permissions identity policies can grant to an IAM role. Which IAM feature should it use?

A permissions boundary. The boundary limits identity grants to a user or role and grants nothing by itself. A service-linked role cannot have a boundary.

What does an AWS STS session policy passed to AssumeRole do?

It limits identity-policy grants for that session to the overlap with the role permissions. It cannot add permissions to the role identity policy.

A team lead must create IAM roles without escaping an approved privilege ceiling. How should an administrator delegate that work?

Require the approved iam:PermissionsBoundary policy ARN during role creation, and prevent removal or modification of that boundary.

An IAM user boundary allows S3 access, but no identity or resource policy grants it. Can the user read S3 objects?

No. A boundary limits grants and does not create one.

An IAM role in account A reads an S3 object in account B using its original credentials. Which policies must allow the action?

The role identity policy in A and the bucket resource policy in B. Applicable policy limits and explicit denies can still block the request.

A team copies S3 objects across accounts and wants to keep using its original principal permissions. Which access pattern fits?

A resource-based bucket policy that grants the original principal access, together with its identity policy. Assuming a role uses the role permissions; it does not merge the original permissions into that session.

An IAM principal cannot assume a role in another AWS account. Which two permissions should the team inspect first?

The caller identity policy must allow sts:AssumeRole on the target role ARN, and the target role trust policy must trust the caller or its account.

Does trusting an AWS account in an IAM role trust policy automatically authorize every identity in that account?

No. It delegates authority to that account, which must grant its caller sts:AssumeRole permission.

A service has no resource-based policy support. How can a principal in another AWS account access it?

Assume a role in the resource account whose permissions cover the required actions.

Which STS operation fits a SAML assertion, an OIDC token, a custom IAM-user broker, or an IAM user needing MFA credentials?

SAML: AssumeRoleWithSAML. OIDC: AssumeRoleWithWebIdentity. Custom IAM-user broker: GetFederationToken. User MFA credentials: GetSessionToken. The SAML and OIDC calls authenticate with provider evidence without AWS access keys.

A GitHub Actions job needs AWS access without stored access keys and only from an approved repository branch. What should the team configure?

An IAM OIDC provider and role trust restricted by audience and subject, then AssumeRoleWithWebIdentity. For GitHub, use aud sts.amazonaws.com and sub for the approved repository and branch.

An external build system has an OIDC identity token and needs temporary AWS permissions for a particular repository. What access pattern fits?

Federate to an IAM role with provider, audience and subject restrictions, and exchange the token through AssumeRoleWithWebIdentity.

An application needs limited AWS access for both signed-in users and guests. Which federation component supplies the credentials?

A Cognito identity pool. It issues temporary AWS credentials governed by IAM roles for authenticated and guest identities.

An on-premises LDAP directory does not support SAML, and users must still get access to AWS without IAM users. What pattern fits?

A custom identity broker that authenticates users against LDAP and requests short-lived credentials from AWS STS for them.

Employees authenticate through a SAML identity provider and need the AWS Management Console. Which endpoint receives the assertion and opens their role session?

The AWS sign-in endpoint. It requests temporary role credentials for the user and redirects the browser to the console using a sign-in URL.

A vendor serves several customers and assumes an IAM role in each account. How can a customer reduce the confused deputy risk?

Require the vendor principal and its unique customer external ID in the role trust policy. The vendor must pass the matching ExternalId to AssumeRole.

An IAM user must authenticate with MFA before assuming a sensitive role. How should the role enforce this?

Require aws:MultiFactorAuthPresent true in its trust policy. The AssumeRole caller supplies SerialNumber and TokenCode.

Is an external ID in an IAM trust policy a password that must be kept secret?

No. It distinguishes the vendor customer context. AWS does not treat it as a secret.

An IAM policy must deny requests without MFA, including calls signed with long-term access keys. Which condition handles a missing MFA key?

Deny with BoolIfExists on aws:MultiFactorAuthPresent set to false. The key is absent on long-term key requests.

How do RBAC and ABAC differ when designing IAM permissions?

RBAC assigns permissions by job function. ABAC compares attributes such as principal and resource tags for supported operations. Provider attributes can become session tags.

An IAM team wants project members to access new resources without adding each resource ARN to a job policy. What pattern fits?

ABAC with matching principal and resource project tags, where the service and action support those conditions.

An S3 home-directory IAM policy uses ${aws:username}. Can a federated IAM role use that policy unchanged?

No. aws:username is unavailable for role requests. Use suitable role or session attributes in a policy designed for that principal.

Which IAM Access Analyzer capabilities help review and reduce permissions?

External, internal and unused access analysis; policy validation; custom policy checks; and policy generation from CloudTrail activity.

A team wants a narrower IAM policy based on observed application activity. How should it use Access Analyzer?

Generate a template from a CloudTrail trail over up to ninety days, then review and customize it. Add required permissions that the activity or generation support does not capture.

You finished every topic of SAA-C03!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified Solutions Architect - Associate (SAA-C03) on Easy Review. Come study too!