Curated

Identity and Access Management (4.1–4.2)

0 votes

Questions60

  1. Question 1

    Identity and Access Management

    Which AWS service evaluates Cedar policies to make fine-grained authorization decisions for custom applications?

    Show the answer

    Correct answerA. Amazon Verified Permissions

    AWhy this is right: Amazon Verified Permissions evaluates Cedar policies against application authorization requests.

    BWhy not this: IAM Access Analyzer analyzes access policies and findings rather than authorizing application requests with Cedar.

    CWhy not this: IAM Identity Center provides workforce access to AWS accounts and applications, not Cedar policy evaluation.

    DWhy not this: Amazon Cognito authenticates application users; it is not the managed Cedar authorization service.

    Amazon Verified Permissions evaluates Cedar policies for fine-grained application authorization. Amazon Cognito handles application user authentication and related identity functions rather than serving as a Cedar policy decision service.

    Open this question
  2. Question 2

    Identity and Access Management

    An IAM role trusts rolesanywhere.amazonaws.com for IAM Roles Anywhere. The account has two trust anchors, one for the production CA and one for a lab CA. Only workloads with certificates authenticated through the production trust anchor may obtain the role's credentials. What should be added to the role's trust policy?

    Show the answer

    Correct answerB. An aws:SourceArn condition equal to the production trust anchor's ARN

    AWhy not this: A lab CA could issue a certificate with the same common name, so the subject alone does not prove the issuing trust anchor.

    BWhy this is right: aws:SourceArn identifies the trust anchor that authenticated the certificate, so only production-anchored sessions match.

    CWhy not this: A boundary caps the role's permissions but does not control which trust anchor can be used to obtain them.

    DWhy not this: The role is assumed by the Roles Anywhere service, so the workload's network address is not the deciding attribute.

    When IAM Roles Anywhere issues a session, aws:SourceArn is set to the trust anchor used in CreateSession, so an aws:SourceArn condition limits the role to certificates validated by the production trust anchor. A subject name condition can be satisfied by a lab certificate with the same name, and a permissions boundary limits permissions rather than who can assume the role.

    Open this question
  3. Question 3

    Identity and Access Management

    An IAM role in account A must directly read objects from an S3 bucket in account B without assuming another role. With no existing grants or explicit denies, which permissions establish cross-account access? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersC. An identity policy on the role allowing s3:GetObject on the objectsE. A bucket policy allowing the account A role to call s3:GetObject

    AWhy not this: A permissions boundary sets a permissions ceiling but supplies no grant by itself.

    BWhy not this: A role trust policy governs who can assume the role, not which external bucket that role can read.

    CWhy this is right: The identity policy supplies the role's account-side permission to read the specified objects.

    DWhy not this: An SCP sets organizational permission limits but does not grant object access to the role.

    EWhy this is right: The bucket policy supplies the resource owner's permission for the external role to read objects.

    Direct cross-account S3 access requires permission from the principal's account and the resource owner's account: the role's identity policy and the bucket policy supply these grants. Permissions boundaries and SCPs limit available permissions but do not grant access.

    Open this question
  4. Question 4

    Identity and Access Management

    A vendor uses one IAM role to access multiple customers' AWS accounts, and each customer trusts that vendor role. What should a customer add to its role trust policy to prevent another vendor customer from causing access to its account?

    Show the answer

    Correct answerB. An sts:ExternalId condition using a vendor-assigned, customer-unique value

    AWhy not this: The vendor's shared outbound address identifies a network source, not the intended customer.

    BWhy this is right: The vendor supplies the customer's unique external ID when assuming the role, separating customer contexts.

    CWhy not this: The same vendor role serves multiple customers, so its ARN cannot distinguish their requests.

    DWhy not this: The organization identifies the vendor's account membership, not which customer caused the request.

    A customer-unique external ID in the trust policy mitigates the cross-account confused deputy problem by binding the vendor's request to the intended customer. Restricting the principal ARN to the shared vendor role does not distinguish that role's customers.

    Open this question
  5. Question 5

    Identity and Access Management

    Employees sign in to AWS IAM Identity Center through an external SAML identity provider. A company must require phishing-resistant MFA before employees enter the AWS access portal; where should the security engineer enforce this requirement?

    Show the answer

    Correct answerB. In the external identity provider's authentication policy

    AWhy not this: Federated employees do not authenticate through account-local IAM users.

    BWhy this is right: The external identity provider controls authentication and can require a phishing-resistant MFA method.

    CWhy not this: Native directory MFA settings do not enforce MFA for authentication performed by an external identity provider.

    DWhy not this: Permission sets control AWS account permissions, not authentication into the AWS access portal.

    With an external identity provider, that provider authenticates users and must enforce the required MFA method. IAM Identity Center directory MFA settings apply to its native identity source, not externally authenticated users.

    Open this question
  6. Question 6

    Identity and Access Management

    An on-premises workload must authenticate to AWS without stored IAM access keys or human sign-in. The company already issues X.509 certificates through its private PKI and has no OIDC or SAML provider; which design best reuses its existing identity infrastructure?

    Show the answer

    Correct answerC. Configure IAM Roles Anywhere with the issuing CA as a trust anchor

    AWhy not this: SAML federation requires assertions from a SAML identity provider, not direct certificate-based workload authentication.

    BWhy not this: Instance profiles deliver roles to EC2 instances, not directly to on-premises workloads.

    CWhy this is right: Roles Anywhere uses trusted X.509 certificates to authenticate workloads running outside AWS.

    DWhy not this: OIDC federation requires tokens from an OIDC provider, not direct presentation of a private PKI certificate.

    IAM Roles Anywhere authenticates workloads outside AWS using X.509 certificates rooted in a configured trust anchor. An IAM OIDC provider requires OIDC tokens; it does not directly accept a workload certificate as its identity token.

    Open this question
  7. Question 7

    Identity and Access Management

    A consumer application needs self-service registration and sign-in, with JWTs that its API can validate. Customers do not need credentials for direct AWS service access; which solution best meets these requirements?

    Show the answer

    Correct answerB. An Amazon Cognito user pool

    AWhy not this: Identity pools issue AWS credentials rather than provide the required customer registration and JWT authentication service.

    BWhy this is right: User pools support self-service registration, sign-in, and JWTs for application authentication.

    CWhy not this: A managed directory provides directory services, not a customer-facing registration and JWT issuance service.

    DWhy not this: IAM Identity Center serves workforce access rather than consumer self-registration and application token issuance.

    An Amazon Cognito user pool provides customer registration, authentication, and JWT issuance. An identity pool exchanges supported identities for temporary AWS credentials, which the application does not require.

    Open this question
  8. Question 8

    Identity and Access Management

    A company uses an external identity provider for its workforce and wants employees to access multiple AWS accounts through AWS IAM Identity Center. Which integration supports federated sign-in and automatic provisioning of users and groups?

    Show the answer

    Correct answerA. SAML 2.0 for sign-in and SCIM for provisioning

    AWhy this is right: SAML handles federated sign-in, and SCIM synchronizes user and group identities.

    BWhy not this: Neither SCIM nor permission sets provides the required federated sign-in.

    CWhy not this: Permission sets define access permissions rather than provision users and groups.

    DWhy not this: SCIM is a provisioning protocol, not a sign-in protocol; SAML does not synchronize the identity directory.

    SAML 2.0 provides federated authentication, while SCIM provisions users and groups into IAM Identity Center. Permission sets define account permissions; they do not provision workforce identities.

    Open this question
  9. Question 9

    Identity and Access Management

    Which AWS service provides employees with a central access portal for multiple AWS accounts?

    Show the answer

    Correct answerC. AWS IAM Identity Center

    AWhy not this: Amazon Cognito supports application user authentication and federation rather than a central workforce portal for AWS accounts.

    BWhy not this: AWS STS issues temporary credentials; it does not provide a workforce access portal.

    CWhy this is right: IAM Identity Center provides an AWS access portal for workforce access across assigned AWS accounts.

    DWhy not this: AWS Directory Service provides managed directory capabilities, not the central multi-account access portal.

    AWS IAM Identity Center provides a central AWS access portal for workforce access to assigned accounts and applications. Amazon Cognito primarily provides identity capabilities for application users, not a workforce account-access portal.

    Open this question
  10. Question 10

    Identity and Access Management

    An OIDC-authenticated workload chains from a broker role into an S3 signing role whose maximum session duration is six hours. It must issue download URLs usable for three hours without replacement; assuming permissions remain valid and no policy further limits signature age, which design meets this requirement?

    Show the answer

    Correct answerA. Federate directly into the signing role for four hours and generate three-hour URLs.

    AWhy this is right: Direct web identity federation avoids role chaining, and four-hour credentials can support a three-hour presigned URL.

    BWhy not this: Direct federation avoids chaining, but one-hour credentials still cannot support three-hour URL validity.

    CWhy not this: The URLs expire when the one-hour signing credentials expire, regardless of their requested URL expiration.

    DWhy not this: Role chaining limits the session to one hour, even when the signing role allows a longer maximum duration.

    Direct AssumeRoleWithWebIdentity federation can obtain a four-hour session when the role permits it, allowing three-hour presigned URLs. Role chaining limits the signing session to one hour, and a presigned URL cannot outlive the credentials that signed it.

    Open this question
  11. Question 11

    Identity and Access Management

    An on-premises service has an enterprise-issued X.509 certificate but no OIDC or SAML identity provider. It needs automatically renewable AWS credentials without storing IAM access keys; which design meets these requirements?

    Show the answer

    Correct answerA. Use IAM Roles Anywhere with the enterprise certificate authority as a trust anchor.

    AWhy this is right: IAM Roles Anywhere uses trusted X.509 certificates to obtain temporary role credentials for workloads outside AWS.

    BWhy not this: EC2 instance profiles deliver role credentials to EC2 instances, not directly to on-premises services.

    CWhy not this: An X.509 certificate is not an OIDC token, and the service has no OIDC identity provider.

    DWhy not this: A certificate is not a SAML assertion; SAML federation requires assertions issued by a trusted identity provider.

    IAM Roles Anywhere authenticates workloads outside AWS with X.509 certificates and supplies temporary role credentials. OIDC federation requires a valid token from an OIDC provider; an X.509 certificate is not a web identity token.

    Open this question
  12. Question 12

    Identity and Access Management

    A company uses an external identity provider with IAM Identity Center and wants federated sign-in, automatic user and group provisioning, and MFA enforcement. Which configuration actions meet these requirements? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersB. Enforce MFA through the external identity provider's sign-in policy.E. Configure SCIM provisioning from the external identity provider.F. Configure SAML 2.0 federation with the external identity provider.

    AWhy not this: SCIM provisions identities; it does not authenticate interactive sign-ins.

    BWhy this is right: The external identity provider controls MFA when it authenticates federated users.

    CWhy not this: SAML assertions communicate authentication information; they do not provide user and group lifecycle synchronization.

    DWhy not this: IAM Identity Center's MFA settings do not enforce MFA for authentication performed by an external identity provider.

    EWhy this is right: SCIM supports automatic provisioning and lifecycle updates for users and groups.

    FWhy this is right: SAML 2.0 establishes federated authentication between the external identity provider and IAM Identity Center.

    SAML 2.0 handles federated sign-in, SCIM provisions users and groups, and the external identity provider enforces MFA. SCIM is not a sign-in protocol, and IAM Identity Center's MFA settings do not control authentication performed by an external identity provider.

    Open this question
  13. Question 13

    Identity and Access Management

    An IAM user can assume a cross-account administrator role, but assumption must require MFA regardless of the user's identity policies. Where should the security engineer enforce this requirement?

    Show the answer

    Correct answerB. In the role's trust policy, condition sts:AssumeRole on aws:MultiFactorAuthPresent

    AWhy not this: The role's permissions policy controls what an assumed session can do, not whether the user can assume the role.

    BWhy this is right: An MFA condition in the trust policy makes MFA a requirement for assuming the role.

    CWhy not this: A session policy limits session permissions; it does not establish the role's admission requirements.

    DWhy not this: A boundary that allows assumption without an MFA condition does not enforce MFA.

    The role's trust policy controls who can assume it and can require MFA for sts:AssumeRole. Conditioning the role's permissions policy affects actions after assumption, not whether a session can be created.

    Open this question
  14. Question 14

    Identity and Access Management

    An administrator places IAM roles in /finance/ and /engineering/ paths and expects the paths to isolate access automatically. What should the administrator conclude?

    Show the answer

    Correct answerC. Paths organize roles; policies must explicitly enforce access restrictions

    AWhy not this: Permissions boundaries must be explicitly configured; roles do not inherit them from paths.

    BWhy not this: Role assumption is governed by authorization policies, not automatically by paths.

    CWhy this is right: Paths are organizational identifiers; authorization restrictions require policies.

    DWhy not this: Placing roles in different paths does not create an account-internal security boundary.

    IAM paths organize identities and can be referenced in policy resource matching, but they do not create access restrictions themselves. A path does not automatically isolate roles or attach a permissions boundary.

    Open this question
  15. Question 15

    Identity and Access Management

    An S3 bucket policy permits the CloudTrail service principal to write logs, but the owner wants that permission usable only by one designated trail. Which condition on the service's allow statement most directly enforces this restriction?

    Show the answer

    Correct answerD. Require aws:SourceArn to equal the designated trail's ARN

    AWhy not this: Principal organization membership does not identify which trail caused the CloudTrail service request.

    BWhy not this: External IDs are used with role assumption, not CloudTrail's direct delivery to S3.

    CWhy not this: The source account condition permits other trails in that account to satisfy the restriction.

    DWhy this is right: Matching the source ARN restricts the service permission to requests originating from the designated trail.

    For CloudTrail delivery, aws:SourceArn identifies the trail responsible for the request, allowing the bucket policy to restrict writes to that trail. aws:SourceAccount limits the source account but does not distinguish trails within that account.

    Open this question
  16. Question 16

    Identity and Access Management

    A central role must trust any role under /automation/ in one specified member account, including roles recreated with the same names, but only while that account belongs to the company's organization. Assuming callers have sts:AssumeRole permission, which trust-policy design meets these requirements?

    Show the answer

    Correct answerD. Trust the member account principal; match aws:PrincipalArn to its automation path and require aws:PrincipalOrgID

    AWhy not this: This restricts the account and organization but permits roles outside the required path.

    BWhy not this: This admits matching roles from other organization accounts instead of only the specified member account.

    CWhy not this: Direct role principals are bound to principal IDs, so deleting and recreating a role breaks that trust.

    DWhy this is right: The account principal limits the account; ARN and organization conditions enforce the path and continuing organization membership.

    Trusting the specified account with conditions on aws:PrincipalArn and aws:PrincipalOrgID enforces the account, path, and organization constraints. ARN conditions survive role recreation; directly named role principals are bound to principal IDs and do not.

    Open this question
  17. Question 17

    Identity and Access Management

    Workforce users sign in through AWS IAM Identity Center from an external identity provider that sends a costCenter attribute. Permission set policies compare aws:PrincipalTag/CostCenter with resources' CostCenter tags, but every request is denied. What is missing?

    Show the answer

    Correct answerD. Enable attributes for access control and map costCenter to the CostCenter key.

    AWhy not this: Identity Center sets session tags itself; permission set policies do not grant sts:TagSession for this.

    BWhy not this: Tags on a permission set are not passed to users' sessions as principal tags.

    CWhy not this: A permission set per cost center is role-based and loses the scaling benefit of ABAC.

    DWhy this is right: Attributes for access control pass the mapped user attribute into the session as a principal tag.

    IAM Identity Center passes user attributes into sessions as principal tags only when attributes for access control are enabled and the attribute is mapped to the key the policies use. Without it, aws:PrincipalTag/CostCenter is empty and the comparison fails. One permission set per cost center would abandon ABAC.

    Open this question
  18. Question 18

    Identity and Access Management

    An application must let an unauthenticated customer upload one file to a specific S3 object key without receiving AWS credentials. Which mechanism should the application provide?

    Show the answer

    Correct answerA. A presigned PUT URL for the object

    AWhy this is right: A presigned PUT URL delegates an upload to the specified object key without giving the customer AWS credentials.

    BWhy not this: A presigned GET URL permits retrieving an object, not uploading it.

    CWhy not this: A user pool ID token identifies an authenticated user but does not directly authorize an S3 upload.

    DWhy not this: A session token alone cannot authenticate AWS requests and would not provide a credential-free upload mechanism.

    A presigned PUT URL authorizes an upload to the specified S3 object key without exposing AWS credentials. A presigned GET URL authorizes downloading rather than uploading.

    Open this question
  19. Question 19

    Identity and Access Management

    A broker assumes one shared role to issue temporary credentials for tenant-specific S3 prefixes. Without changing the role or bucket policies, how should it restrict each session to its tenant's prefix?

    Show the answer

    Correct answerC. Pass a session policy allowing access only to the tenant's prefix.

    AWhy not this: Denying the tenant's own prefix blocks the intended access while leaving other role permissions unrestricted.

    BWhy not this: An external ID does not independently limit the S3 permissions of the resulting session.

    CWhy this is right: An allow-only session policy narrows the role's identity-based permissions to the specified tenant prefix.

    DWhy not this: A role session name labels the session but does not independently restrict its permissions.

    A session policy limits the session to the intersection of the role's permissions and the session policy's permissions. An external ID controls role assumption when checked by the trust policy; it does not independently restrict S3 object access.

    Open this question
  20. Question 20

    Identity and Access Management

    Besides an access key ID and secret access key, what must an application supply when signing requests with AWS STS temporary credentials?

    Show the answer

    Correct answerA. A session token

    AWhy this is right: The session token must accompany requests authenticated with AWS STS temporary credentials.

    BWhy not this: An identity provider certificate validates federation assertions; it is not part of temporary AWS credentials.

    CWhy not this: A role ARN identifies a role but cannot replace the session token in signed service requests.

    DWhy not this: An MFA device serial number can be an input when obtaining credentials, but it is not required with subsequent service requests.

    AWS STS temporary credentials include an access key ID, a secret access key, and a session token. A role ARN identifies a role but is not part of the credential set used to sign service requests.

    Open this question
  21. Question 21

    Identity and Access Management

    A workload receives OIDC tokens from an external identity provider and needs temporary AWS credentials without stored AWS access keys. Which AWS STS operation should it use?

    Show the answer

    Correct answerB. AssumeRoleWithWebIdentity

    AWhy not this: AssumeRoleWithSAML accepts SAML assertions, not OIDC tokens.

    BWhy this is right: AssumeRoleWithWebIdentity accepts an OIDC token and returns temporary credentials for a trusted role.

    CWhy not this: GetSessionToken requires an existing IAM user's AWS credentials rather than an OIDC token.

    DWhy not this: GetFederationToken requires an AWS-credential-signed request rather than accepting an OIDC token.

    AssumeRoleWithWebIdentity exchanges a supported OIDC token for temporary role credentials. AssumeRoleWithSAML requires a SAML assertion rather than an OIDC token.

    Open this question
  22. Question 22

    Identity and Access Management

    A SaaS provider assumes customer roles through a shared AWS principal, using role ARNs supplied by customers. Which configuration best prevents a customer from tricking the provider into assuming another customer's role?

    Show the answer

    Correct answerD. Require a provider-assigned external ID unique to each customer in the role trust policy.

    AWhy not this: The provider uses the same outbound infrastructure for multiple customers, so source IP does not distinguish them.

    BWhy not this: A shared external ID cannot distinguish requests made for different customers.

    CWhy not this: A role session name identifies a session but does not securely bind the provider's request to the intended customer.

    DWhy this is right: A provider-controlled, customer-specific external ID prevents another customer from supplying a matching value through the provider.

    A unique external ID assigned by the provider binds each customer's AssumeRole request to the intended role, mitigating the confused deputy problem. Checking the provider's source IP identifies the provider but does not distinguish its customers.

    Open this question
  23. Question 23

    Identity and Access Management

    Developers create Secrets Manager secrets with tags supplied in the creation request. The creation Allow must require a Project tag matching the caller's Project principal tag, without relying on an existing resource tag. Which condition meets this requirement?

    Show the answer

    Correct answerC. StringEquals comparing aws:RequestTag/Project to ${aws:PrincipalTag/Project}

    AWhy not this: Checking the principal tag's presence does not validate tags supplied during creation.

    BWhy not this: Restricting tag key names does not require a matching Project value.

    CWhy this is right: The comparison requires the submitted Project value to match the caller's Project attribute.

    DWhy not this: An existing resource tag does not represent the tag value submitted to create the secret.

    aws:RequestTag/Project evaluates the tag submitted during creation and can require it to match the principal's Project. aws:ResourceTag/Project refers to an existing resource tag, not the proposed tag value.

    Open this question
  24. Question 24

    Identity and Access Management

    An ABAC design grants developers access when their Project principal tag matches a resource's Project tag. Which controls protect the integrity of these authorization attributes? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersC. Restrict changes to protected resources' Project tags to approved workflows.E. Use a trusted identity source to assign federated Project attributes.F. Restrict changes to developers' Project principal tags to trusted administrators.

    AWhy not this: Unrestricted retagging can bypass project isolation after resource creation.

    BWhy not this: Tag policies do not independently authorize resource access or secure every authorization-tag mutation.

    CWhy this is right: Protected resource tags prevent resources from being moved into a developer's accessible project without approval.

    DWhy not this: Arbitrary session tags could let developers impersonate another project's attributes.

    EWhy this is right: A trusted identity source prevents users from freely choosing their federated authorization attributes.

    FWhy this is right: Restricting principal tag changes prevents developers from selecting another project's authorization identity.

    ABAC requires trustworthy attributes on both principals and resources, including federated session attributes. Tag policies can standardize tags but do not replace access controls that prevent unauthorized attribute changes.

    Open this question
  25. Question 25

    Identity and Access Management

    A company has stable auditor and operator job functions with different permitted actions. Access does not depend on project, department, or resource attributes. Which design most directly implements these requirements?

    Show the answer

    Correct answerB. Create IAM roles for each job function with appropriate permissions.

    AWhy not this: Attribute matching bases access on attributes rather than the stated job-function permissions.

    BWhy this is right: Job-function roles group the actions appropriate to each responsibility.

    CWhy not this: Identical boundaries set common permission ceilings rather than distinct job-function grants.

    DWhy not this: IAM paths organize identities but do not grant or restrict permissions.

    RBAC assigns permissions to roles representing job functions. Matching principal and resource attributes implements ABAC, which is unnecessary when access depends only on stable job responsibilities.

    Open this question
  26. Question 26

    Identity and Access Management

    A trusted identity provider assigns Project=Alpha to a federated session in RoleA, which then assumes RoleB tagged Project=Shared; RoleB's policies use the Project principal tag. Alpha must survive the chain without a caller-selected replacement. Which design meets these requirements?

    Show the answer

    Correct answerC. Make Project transitive, permit required session tagging, and inherit it without resubmitting Project.

    AWhy not this: Passing a tag whose key matches an inherited transitive tag causes the role assumption to fail.

    BWhy not this: A nontransitive session tag is lost during chaining, leaving the destination role's Shared attribute.

    CWhy this is right: The trusted Project value survives chaining and overrides RoleB's Project role tag.

    DWhy not this: Caller-selected values break the requirement to preserve the trusted identity provider's assignment.

    A transitive session tag persists through role chaining and overrides a matching destination role tag. Resubmitting a session tag with the same key as an inherited transitive tag causes role assumption to fail rather than replacing the inherited value.

    Open this question
  27. Question 27

    Identity and Access Management

    An S3 bucket contains objects from multiple projects, each tagged with its own Project value. A role's GetObject permissions must depend on each object's Project tag rather than the bucket's tags. Which condition should its Allow statement use?

    Show the answer

    Correct answerC. StringEquals comparing s3:ExistingObjectTag/Project to ${aws:PrincipalTag/Project}

    AWhy not this: Request object tags describe submitted tags rather than existing tags on an object being read.

    BWhy not this: GetObject does not submit a new Project resource tag for this condition to compare.

    CWhy this is right: The condition compares the requested object's stored Project value with the caller's Project attribute.

    DWhy not this: Tag key names neither identify the object's stored Project value nor compare it with the caller's value.

    s3:ExistingObjectTag/Project evaluates the stored tag on the object being read. s3:RequestObjectTag/Project evaluates tags submitted in supported write requests, not the stored object tags used to authorize GetObject.

    Open this question
  28. Question 28

    Identity and Access Management

    An employee provisioned through SCIM cannot sign in to IAM Identity Center through the external SAML identity provider, although the account is active and assigned access. The SAML assertion's NameID is an opaque identifier, while the employee's IAM Identity Center username is an email address; what should the engineer change?

    Show the answer

    Correct answerB. Map the SAML NameID to the employee's IAM Identity Center username.

    AWhy not this: Permission set provisioning controls account permissions, not matching an incoming SAML identity to a user.

    BWhy this is right: Matching NameID to the provisioned username lets IAM Identity Center identify the federated employee.

    CWhy not this: Session duration affects session lifetime after authentication, not SAML identity matching.

    DWhy not this: A permission set's inline policy governs AWS access after sign-in and cannot fix the SAML identity mismatch.

    IAM Identity Center must match the SAML NameID to the provisioned username. Reprovisioning a permission set updates AWS account permissions but does not fix a mismatch in the federated user's identity.

    Open this question
  29. Question 29

    Identity and Access Management

    An administrator using an IAM user needs temporary credentials that retain the user's permissions and carry MFA authentication context for subsequent AWS API requests. Which AWS STS operation should the administrator use?

    Show the answer

    Correct answerB. GetSessionToken

    AWhy not this: AssumeRole creates a role session rather than retaining the IAM user's permissions.

    BWhy this is right: GetSessionToken supports MFA parameters and issues temporary credentials with the IAM user's permissions.

    CWhy not this: GetFederationToken issues federated-user credentials but does not accept MFA authentication parameters.

    DWhy not this: AssumeRoleWithSAML exchanges a SAML assertion for role credentials, not an MFA-authenticated IAM user session.

    GetSessionToken with MFA parameters issues temporary credentials based on the IAM user's permissions and includes MFA authentication context. AssumeRole instead creates a role session governed by the role's permissions.

    Open this question
  30. Question 30

    Identity and Access Management

    A broker assumes an entry role with a validated TenantId session tag, then chains into a data role whose policy uses aws:PrincipalTag/TenantId; the downstream call must not resubmit the tag. Both roles already permit the required role assumption and session tagging; how should the broker preserve tenant isolation through the chain?

    Show the answer

    Correct answerD. Include TenantId in TransitiveTagKeys when assuming the entry role.

    AWhy not this: SourceIdentity supports attribution but does not populate aws:PrincipalTag/TenantId.

    BWhy not this: RoleSessionName identifies the session but does not create a TenantId principal tag.

    CWhy not this: A role resource tag is shared configuration, not an inherited tenant-specific session attribute.

    DWhy this is right: A transitive session tag is inherited by subsequent role sessions without resubmitting the tag.

    Marking a session tag as transitive preserves it through role chaining, allowing the data role's policy to evaluate aws:PrincipalTag/TenantId. SourceIdentity persists for attribution but does not become a principal tag.

    Open this question
  31. Question 31

    Identity and Access Management

    A service caches AWS STS credentials at startup and successfully calls AWS APIs for an hour before requests fail with ExpiredToken. What should the engineer do to restore reliable authentication?

    Show the answer

    Correct answerC. Refresh temporary credentials before their expiration time.

    AWhy not this: The service already obtained credentials successfully; changing trust does not renew them.

    BWhy not this: Changing the maximum session duration does not extend the lifetime of credentials already issued.

    CWhy this is right: Obtaining fresh credentials before expiration prevents continued use of an expired session.

    DWhy not this: Missing permissions cause authorization failures, not expiration of previously working credentials.

    ExpiredToken indicates that the service is using expired temporary credentials, so it must obtain and use fresh credentials. Increasing a role's maximum session duration does not extend credentials that have already been issued.

    Open this question
  32. Question 32

    Identity and Access Management

    An S3 bucket policy directly grants GetObject to an IAM user's ARN in the same account. The user's permissions boundary omits GetObject, and no applicable policy explicitly denies the request; what is the authorization result?

    Show the answer

    Correct answerC. Access is allowed through the direct bucket-policy grant.

    AWhy not this: An IAM user can receive this permission directly without assuming a role.

    BWhy not this: An implicit boundary deny does not limit this same-account resource-policy grant directly to an IAM user ARN.

    CWhy this is right: The direct same-account resource-policy grant authorizes access when no applicable explicit deny exists.

    DWhy not this: This direct resource-policy grant does not require an additional identity-policy Allow.

    Within the same account, a resource-policy grant directly to an IAM user ARN is not limited by an implicit deny in that user's permissions boundary. An explicit deny would still override the grant.

    Open this question
  33. Question 33

    Identity and Access Management

    Developers must create application roles and attach identity policies, but those policies must remain constrained by an administrator-managed permissions boundary. Assuming developers cannot edit the boundary policy itself, which controls prevent them from creating or modifying roles without that boundary? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Deny DeleteRolePermissionsBoundary and deny PutRolePermissionsBoundary when it specifies another boundary.C. Condition CreateRole permission on iam:PermissionsBoundary matching the approved boundary ARN.

    AWhy not this: A developer's permissions boundary does not automatically become a boundary on roles the developer creates.

    BWhy this is right: Blocking removal and unauthorized replacement preserves the approved boundary on existing roles.

    CWhy this is right: The condition requires developers to supply the approved boundary when creating roles.

    DWhy not this: Remediation after creation leaves a period when a role can have unconstrained identity permissions.

    Requiring the approved boundary at creation prevents unbounded roles, while denying its removal or replacement preserves that restriction. Scheduled remediation leaves a window of excessive access, and a creator's boundary is not inherited by created roles.

    Open this question
  34. Question 34

    Identity and Access Management

    A company uses tag-based authorization, but a required service action supports resource-level permissions without supporting resource-tag conditions. How should the company restrict that action to each team's resources?

    Show the answer

    Correct answerB. Create team roles with policies listing the permitted resource ARNs.

    AWhy not this: Trust policies control role assumption, not authorization for subsequent service actions.

    BWhy this is right: Resource-level permissions allow team roles to restrict the action to explicitly identified resources.

    CWhy not this: Tags do not enforce authorization without supported policy conditions that evaluate them.

    DWhy not this: IAM paths organize identities but do not automatically restrict their permissions.

    Team roles with explicit resource ARNs provide scoped access when an action cannot use resource-tag conditions. Matching tags alone does not establish permissions or compensate for unsupported condition keys.

    Open this question
  35. Question 35

    Identity and Access Management

    A batch application's IAM role has broad Amazon S3 and Amazon DynamoDB permissions. CloudTrail has recorded the application's activity for the past 90 days. The security team wants a starting policy that grants only the services and actions the role actually used. Which approach meets this requirement with the least effort?

    Show the answer

    Correct answerB. Generate a policy with IAM Access Analyzer from the role's CloudTrail activity.

    AWhy not this: The simulator tests whether current policies allow actions; it does not show which actions the role used.

    BWhy this is right: Policy generation builds a least-privilege starting policy from the role's recorded CloudTrail activity.

    CWhy not this: The credential report lists IAM users' passwords and access keys, not a role's used actions.

    DWhy not this: A boundary identical to the current policy leaves the role's effective permissions unchanged.

    IAM Access Analyzer policy generation reviews a role's CloudTrail activity for a chosen period and produces a policy that contains only the services and actions it used, which the team then reviews and refines. The Policy Simulator shows what current policies allow, not what was used, and a boundary that copies the current policy narrows nothing.

    Open this question
  36. Question 36

    Identity and Access Management

    An application only reads messages from one SQS queue. Which policy change most directly applies least privilege to its current sqs:* permission?

    Show the answer

    Correct answerD. Allow sqs:ReceiveMessage on that queue's ARN.

    AWhy not this: Restricting the resource helps, but sqs:* still permits unnecessary queue operations.

    BWhy not this: Account-wide queue access and all SQS actions exceed the application's stated needs.

    CWhy not this: The action is restricted, but access to unrelated queues remains unnecessarily broad.

    DWhy this is right: The policy permits the required action only on the required resource.

    Allowing only ReceiveMessage on the required queue limits both actions and resources. Restricting the queue while retaining sqs:* still permits unnecessary operations.

    Open this question
  37. Question 37

    Identity and Access Management

    An Amazon Cognito authorization-code flow returns a code, but token exchange fails with invalid_grant; the code is fresh, unused, and its PKCE verifier is correct. The authorization request used a callback URI ending in /callback, while the token request uses /callback/; what should the developer change?

    Show the answer

    Correct answerA. Use the identical redirect_uri in both requests

    AWhy this is right: The redirect_uri in the token exchange must match the value used in the authorization request.

    BWhy not this: Implicit grant does not repair an authorization-code exchange and changes the authentication flow.

    CWhy not this: Allowlisting both URIs does not resolve a mismatch between requests in the same authorization-code flow.

    DWhy not this: Identity pools issue AWS credentials, not OAuth tokens in exchange for authorization codes.

    The token request's redirect_uri must match the URI used to obtain the authorization code. Allowlisting both callback URIs does not make them interchangeable during a single authorization-code exchange.

    Open this question
  38. Question 38

    Identity and Access Management

    A browser application calls Amazon Cognito user pool authentication directly and receives an error indicating that SECRET_HASH is missing; its app client has a client secret. Which change resolves this without embedding a secret in browser code?

    Show the answer

    Correct answerA. Use an app client without a client secret

    AWhy this is right: An app client without a secret supports public clients that cannot securely store confidential credentials.

    BWhy not this: STS permissions do not resolve a user pool app client's SECRET_HASH requirement.

    CWhy not this: Local storage is accessible to client-side code and cannot protect a client secret.

    DWhy not this: Callback URL configuration does not remove the secret-hash requirement for direct authentication calls.

    A browser is a public client and cannot securely retain a client secret, so direct authentication should use an app client without one. Storing the secret locally exposes it and does not provide secure client authentication.

    Open this question
  39. Question 39

    Identity and Access Management

    An IAM Identity Center user authenticates successfully, but account assignment fails because permission-set provisioning cannot find the referenced customer managed policy /security/AnalystAccess. The target account has AnalystAccess at path /, and governance requires retaining the permission set's policy reference; what should the administrator do?

    Show the answer

    Correct answerD. Create /security/AnalystAccess in the target account and retry provisioning

    AWhy not this: The policy must exist with the referenced name and path in the account receiving the permission set.

    BWhy not this: Direct role modification does not repair the unresolved permission-set reference or the failed provisioning operation.

    CWhy not this: Authentication already succeeds; identity provisioning does not resolve a missing target-account IAM policy.

    DWhy this is right: The target account must contain a policy whose name and path exactly match the permission-set reference.

    IAM Identity Center resolves a customer managed policy reference by name and path in each target account. A same-named policy at a different path does not satisfy the reference; creating it only in the management account does not satisfy target-account provisioning.

    Open this question
  40. Question 40

    Identity and Access Management

    AWS sign-ins through AD Connector fail for all users, although direct on-premises domain sign-ins work and connector DNS and network connectivity checks pass. The connector's service-account password was rotated without updating AWS Directory Service; what should the administrator do?

    Show the answer

    Correct answerC. Update the AD Connector service-account credentials

    AWhy not this: Working direct domain sign-ins indicate that individual user passwords are not the shared failure.

    BWhy not this: Session duration affects issued sessions, not the connector's ability to authenticate against the directory.

    CWhy this is right: The connector must use the current service-account password to communicate with the directory.

    DWhy not this: DNS checks already pass, and changing DNS does not correct stale service-account credentials.

    AD Connector needs valid service-account credentials to communicate with the on-premises directory. Updating the connector after the password rotation restores that connection; resetting user passwords does not repair the connector's stale credentials.

    Open this question
  41. Question 41

    Identity and Access Management

    Which AWS service records IAM user console sign-in events for investigating failed authentication attempts?

    Show the answer

    Correct answerD. AWS CloudTrail

    AWhy not this: AWS STS issues temporary security credentials rather than serving as the console sign-in audit service.

    BWhy not this: Amazon Cognito authenticates application users; it is not the audit source for IAM user console sign-ins.

    CWhy not this: AWS Directory Service provides directory capabilities rather than recording IAM user console sign-in events.

    DWhy this is right: CloudTrail records ConsoleLogin events that can show failed IAM user authentication.

    AWS CloudTrail records AWS Management Console sign-in events, including authentication failures. Amazon Cognito manages application user authentication rather than recording IAM user console sign-in events.

    Open this question
  42. Question 42

    Identity and Access Management

    An application must list keys only under reports/ in an S3 bucket. Which Allow statement configuration grants the required listing access without permitting listing other prefixes?

    Show the answer

    Correct answerD. s3:ListBucket on the bucket ARN, with s3:prefix restricted to reports/ and reports/*

    AWhy not this: GetObject permits reading objects, not listing their keys.

    BWhy not this: ListBucket does not support object ARNs as its resource.

    CWhy not this: A delimiter groups listing results but does not restrict listing to the reports/ prefix.

    DWhy this is right: ListBucket requires a bucket resource; the prefix condition limits listing requests to the permitted namespace.

    s3:ListBucket applies to the bucket ARN, and an s3:prefix condition restricts the requested listing prefix. Object ARNs do not scope ListBucket, and a delimiter controls grouping rather than limiting access to reports/.

    Open this question
  43. Question 43

    Identity and Access Management

    A role's identity policy allows s3:GetObject on a bucket in the same account. The bucket policy denies s3:GetObject to all principals with a StringNotEquals condition on aws:SourceVpce for vpce-1a2b3c4d. The role calls GetObject from an on-premises network over the internet, not through any VPC endpoint. What is the result?

    Show the answer

    Correct answerA. Denied, because the explicit Deny applies and overrides the identity policy's Allow.

    AWhy this is right: The Deny matches because the endpoint key is missing, and an explicit Deny overrides any Allow.

    BWhy not this: Negated condition operators such as StringNotEquals evaluate to true when the key is absent, so the Deny still matches.

    CWhy not this: Identity and resource policies are evaluated together; neither takes precedence over an explicit Deny.

    DWhy not this: In the same account an identity policy Allow is sufficient; the failure comes from the explicit Deny.

    A request that does not use a VPC endpoint has no aws:SourceVpce value, and a negated operator such as StringNotEquals evaluates to true when the key is missing, so the Deny applies. An applicable explicit Deny overrides every Allow. Within one account, an identity policy Allow alone would otherwise be enough, so the missing bucket-policy Allow is not the cause.

    Open this question
  44. Question 44

    Identity and Access Management

    An IAM user's policies allow deletion but must deny it if MFA is absent or the source IP is outside an approved range. One Deny statement combines BoolIfExists aws:MultiFactorAuthPresent=false and NotIpAddress aws:SourceIp; how should it be corrected?

    Show the answer

    Correct answerD. Put each condition in a separate Deny statement covering deletion.

    AWhy not this: Changing the Boolean operator does not change the AND relationship between the conditions.

    BWhy not this: An additional Allow cannot fix the missing independent denial conditions.

    CWhy not this: A permissions boundary uses the same condition-combination logic within a statement.

    DWhy this is right: Each Deny applies independently, so either absent MFA or an unapproved source IP blocks deletion.

    Different condition operators in one statement are combined with AND, so the existing Deny requires both conditions to match. Separate Deny statements enforce either violation independently; moving the combined conditions to a boundary preserves the flawed logic.

    Open this question
  45. Question 45

    Identity and Access Management

    A deployment role can create Lambda functions and currently has iam:PassRole on all roles. Which changes restrict role passing to roles under /lambda-app/ and only to Lambda? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Restrict the iam:PassRole Resource to role ARNs under /lambda-app/.B. Require iam:PassedToService to equal lambda.amazonaws.com.

    AWhy this is right: The Resource element in an iam:PassRole statement identifies the roles the caller may pass.

    BWhy this is right: iam:PassedToService restricts the service to which the caller may pass a role.

    CWhy not this: iam:AssociatedResourceArn identifies an associated resource, such as a function, rather than the passed role.

    DWhy not this: aws:PrincipalArn identifies the deployment role making the request, not the role being passed.

    The Resource element limits which roles can be passed, and iam:PassedToService limits the receiving service. aws:PrincipalArn identifies the caller, not the role being passed; iam:AssociatedResourceArn identifies the associated service resource.

    Open this question
  46. Question 46

    Identity and Access Management

    An S3 bucket policy directly grants a same-account role session GetObject, and the role's identity policy and permissions boundary also allow it. In AWS Organizations, the root and account SCPs allow all actions, but the account's parent OU has only an SCP allowing EC2 actions; no policy explicitly denies GetObject. Why does access fail?

    Show the answer

    Correct answerA. The parent OU provides no applicable SCP Allow.

    AWhy this is right: The parent OU's SCP does not allow S3, so the action falls outside the member account's effective SCP permissions.

    BWhy not this: The session already exists; S3 does not need to assume the caller's role to authorize GetObject.

    CWhy not this: A permissions boundary limits permissions rather than granting them, and the boundary already allows the action.

    DWhy not this: A bucket policy can grant access directly to a role session, but that grant remains subject to applicable SCPs.

    With allow-list SCPs, an action must be allowed at every level from the root through the account. The parent OU omits S3, so access is denied even without an explicit Deny; a direct resource-policy grant to a role session does not bypass SCP restrictions.

    Open this question
  47. Question 47

    Identity and Access Management

    An EC2 API request fails and returns an encoded authorization failure message. Which action should an authorized administrator use to inspect the additional authorization details?

    Show the answer

    Correct answerD. AWS STS DecodeAuthorizationMessage

    AWhy not this: ValidatePolicy checks policy documents for findings; it does not decode authorization failure messages.

    BWhy not this: SimulatePrincipalPolicy evaluates permissions for a simulated request rather than decoding the returned message.

    CWhy not this: LookupEvents retrieves CloudTrail events rather than decoding an encoded authorization failure message.

    DWhy this is right: DecodeAuthorizationMessage exposes the encoded authorization details when the caller has the required permission.

    AWS STS DecodeAuthorizationMessage decodes authorization details returned by supported AWS API failures and requires sts:DecodeAuthorizationMessage permission. IAM policy simulation evaluates supplied requests; it does not decode an encoded failure message.

    Open this question
  48. Question 48

    Identity and Access Management

    The IAM Policy Simulator shows that a role's identity policy allows s3:GetObject on a bucket in the same account, and the bucket policy also allows it. Live GetObject requests for objects encrypted with SSE-KMS under a customer managed key return AccessDenied, while unencrypted objects in the bucket download. What explains the failure?

    Show the answer

    Correct answerB. The role lacks kms:Decrypt on the KMS key, which the simulation did not test.

    AWhy not this: GetObjectVersion is needed for reading a specific version, not for decrypting SSE-KMS objects.

    BWhy this is right: S3 calls KMS with the caller's permissions, so the role needs kms:Decrypt; simulating s3:GetObject alone does not show this.

    CWhy not this: KMS permissions come from the key policy and IAM policies; a bucket policy cannot grant them.

    DWhy not this: SSE-KMS objects can be read over any S3 endpoint the caller is allowed to use.

    Reading an SSE-KMS object requires kms:Decrypt on the key in addition to s3:GetObject, so the request fails when neither the role's policies nor the key policy allow it. The simulation evaluated only the s3:GetObject action. A bucket policy cannot grant KMS permissions, and SSE-KMS objects do not require a VPC endpoint.

    Open this question
  49. Question 49

    Identity and Access Management

    A role's policy allows access only when a request condition matches, but an IAM Policy Simulator test returns an unexpected denial. Which inputs should an administrator verify against the failed request? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersB. The service action being simulatedC. The resource ARN being evaluatedE. The condition context values supplied

    AWhy not this: A policy's descriptive name does not determine whether its statements allow a request.

    BWhy this is right: A different action can match different policy statements and produce a different authorization result.

    CWhy this is right: The resource ARN determines which resource-scoped statements apply.

    DWhy not this: Last-accessed information records activity; it is not an input to policy evaluation.

    EWhy this is right: Missing or different context values can prevent a conditional Allow statement from matching.

    Simulation depends on the requested action, resource, and condition context matching the real request. Last-accessed information describes past activity, and a policy's name does not affect its authorization logic.

    Open this question
  50. Question 50

    Identity and Access Management

    A role in account A cannot download an S3 object in account B encrypted with a customer managed KMS key. The role and bucket policies allow GetObject, and the role allows kms:Decrypt, but the key policy grants access only within account B; no explicit denies apply. What causes the failure?

    Show the answer

    Correct answerC. The KMS key policy lacks cross-account authorization.

    AWhy not this: A role trust policy controls role assumption; a KMS key is not a principal that assumes the role.

    BWhy not this: A bucket policy controls access to S3 resources, not authorization to use a KMS key.

    CWhy this is right: The caller's IAM permission is insufficient without authorization from the KMS key's account.

    DWhy not this: A customer managed key in another account can be used when the required cross-account permissions exist.

    Cross-account use of a KMS key requires authorization from the key's account as well as an IAM permission in the caller's account. An S3 bucket policy cannot grant permission to use a KMS key.

    Open this question