Quibank app: now on the App Store — free, works offline. Get the app ↗

22 Security: IAM & Access Management Practice Questions & Answers

Every Security: IAM & Access Management practice question from the AWS Cloud Practitioner Practice Test, with the correct answer and a short explanation.

Start practice test →
  1. 1. An employee moves from the finance team to the data team. Each team has an IAM user group with the permissions it needs. What is the best way to update the employee's access?

    • A.Attach the data team's policies directly to the IAM user and keep the finance group
    • B.Add the data team's IAM role to the finance group that the user already belongs to
    • C.Nest the finance group inside the data group and leave the user where it is
    • D.Remove the IAM user from the finance group and add the user to the data group✓ Answer

    Group membership is how permissions follow a job: changing groups removes the old permissions and adds the new ones in one step. A group holds only IAM users, so it cannot contain a role or another group, and keeping the finance group would leave access the employee no longer needs.

    Ref QB-QREVAHSource: IAM User Guide, IAM user groupsReport a problem with this question

  2. 2. An application on an Amazon EC2 instance needs to read objects from an Amazon S3 bucket. Which approach follows AWS best practice?

    • A.Add the instance to an IAM user group so the application inherits the group's permissions
    • B.Assign an IAM role to the instance so the application receives temporary credentials✓ Answer
    • C.Encrypt access keys with AWS KMS and embed them in the code so they stay out of plain view
    • D.Store an IAM user's access keys on the instance so the application can always reach them

    A role has no long-term credentials; the workload receives temporary credentials that AWS rotates, so nothing permanent sits on the instance or in the code. Encrypted or not, stored access keys remain long-term credentials, and a user group can contain only IAM users, not instances.

    Ref QB-69WCJFSource: IAM User Guide, Security best practices in IAM (require workloads to use temporary credentials with IAM roles)Report a problem with this question

  3. 3. A security team that works in one AWS account needs to review resources in a second AWS account owned by the same company. What is the recommended way to give the team this access?

    • A.Copy the team's IAM users and their access keys into the second account
    • B.Create an IAM role in the second account that the first account is trusted to assume✓ Answer
    • C.Create an IAM user in the second account and share its password with the whole team
    • D.Add the team's IAM users to a user group that exists in the second account

    A cross-account role lives in the account that owns the resources: its permissions policy says what is allowed and its trust policy names who may assume it, and the session uses temporary credentials. User groups cannot hold users from another account, and IAM users and their keys belong to one account, so they cannot be copied into another.

    Ref QB-PR3J5GSource: IAM User Guide, IAM roles (cross-account access)Report a problem with this question

  4. 4. A company wants one reusable policy that it can attach to several IAM roles, that allows only the few actions its reporting job needs, and that its administrators can edit over time. Which policy type fits?

    • A.Service control policy, because it grants permissions directly to each role it names
    • B.Inline policy, because one copy can be shared by many roles across the account
    • C.AWS managed policy, because the company can edit it after attaching it to its roles
    • D.Customer managed policy, because the company creates and edits it and can reuse it✓ Answer

    Customer managed policies are created and edited by the customer and can be attached to many principals, which is how permissions are tailored to least privilege. AWS managed policies cannot be edited by customers, inline policies belong to a single identity, and service control policies set maximums without granting anything.

    Ref QB-59J2DESource: IAM User Guide, Managed policies and inline policiesReport a problem with this question

  5. 5. An administrator embedded an inline policy in one IAM role. What happens to that policy when the role is deleted?

    • A.The policy stays in the account as a customer managed policy that can be reattached
    • B.The policy becomes an AWS managed policy that AWS maintains for the account
    • C.The policy is deleted with the role because it exists only as part of that role✓ Answer
    • D.The policy moves to the role's user group because groups inherit the role's policies

    An inline policy has a strict one-to-one relationship with a single user, group, or role, so it is deleted along with that identity. If a policy could apply to more than one identity, AWS recommends a managed policy instead.

    Ref QB-NRQ7YESource: IAM User Guide, Managed policies and inline policiesReport a problem with this question

  6. 6. An IAM user belongs to a group whose policy allows deleting objects in an Amazon S3 bucket. A second policy attached to the user explicitly denies that same action. What happens when the user tries to delete an object?

    • A.The request is denied because the user's policy is evaluated before the group's
    • B.The request is denied because an explicit deny overrides any allow in any policy✓ Answer
    • C.The request is allowed because the most recently attached policy takes priority
    • D.The request is allowed because one allow in any attached policy is enough

    IAM denies everything by default, requires an allow, and treats an explicit deny in any applicable policy as final. Attachment order and whether the policy sits on the group or the user do not change that result.

    Ref QB-497Q7DSource: IAM User Guide, Policy evaluation logicReport a problem with this question

  7. 7. A summer intern needs to read files in one specific Amazon S3 bucket and nothing else. Which choice applies the principle of least privilege?

    • A.A policy allowing read actions on that one bucket, since it grants only what the task needs✓ Answer
    • B.The PowerUserAccess managed policy, since it leaves out most IAM actions from what it grants
    • C.A shared administrator login, since the intern will use it only to read files in the bucket
    • D.The ReadOnlyAccess managed policy, since read access cannot change anything in the account

    Least privilege means granting only the specific actions on the specific resources a task requires, not no access at all and not merely safe-sounding broad access. ReadOnlyAccess would still expose every other service and bucket, and PowerUserAccess or a shared administrator login grants far more.

    Ref QB-MRCVSDSource: IAM User Guide, Security best practices in IAM (apply least-privilege permissions)Report a problem with this question

  8. 8. An auditor asks for a list of all IAM users in the account showing the status of each user's password, access keys, and MFA device. Which should the administrator provide?

    • A.AWS CloudTrail event history, a record of the API calls made in the account
    • B.IAM credential report, a downloadable list of users and their credential status✓ Answer
    • C.IAM Access Analyzer findings, a list of resources shared publicly or across accounts
    • D.AWS Config resource timeline, a history of changes to resource configurations

    The credential report lists every IAM user with the status of passwords, access keys, and MFA, which makes it the audit tool for credential lifecycle. CloudTrail records API activity, AWS Config records resource configuration, and IAM Access Analyzer finds external access to resources.

    Ref QB-39UC2CSource: IAM User Guide, Generate credential reports for your AWS accountReport a problem with this question

  9. 9. A company is reviewing how its AWS account root user is protected. Which practice does AWS recommend?

    • A.Apply the IAM account password policy to the root user and force regular changes
    • B.Set a strong root password and share it only with the senior administrators
    • C.Enable MFA for the root user and keep no access keys for that identity✓ Answer
    • D.Keep root access keys on an encrypted laptop and rotate them every few months

    The root user has complete access to the account, so AWS calls for MFA, no root access keys, and no shared credentials. A strong password does not make long-term keys acceptable, and the IAM account password policy applies to IAM users, not to the root user.

    Ref QB-KRZHMCSource: IAM User Guide, Root user best practices for your AWS accountReport a problem with this question

  10. 10. A small company has just opened an AWS account and signed in as the root user. What should it do before starting everyday administration?

    • A.Protect the root user with MFA and set up an administrative identity, since root is for rare tasks✓ Answer
    • B.Give each administrator the root password, since AWS CloudTrail records who used it each time
    • C.Keep the root user for all daily tasks, since only it can reach every service and resource
    • D.Create root access keys for daily scripts, since scripts cannot respond to an MFA prompt

    Because root has complete access, its credentials should be secured first and used only for the few tasks that require them, while a separate administrative identity handles daily work. Root access keys and a shared root password both raise the risk, and shared use also destroys individual accountability.

    Ref QB-2TMGT2Source: IAM User Guide, Root user best practices for your AWS accountReport a problem with this question

  11. 11. In a standalone AWS account that is not part of AWS Organizations, which task can only the root user perform?

    • A.Updating the contact details
    • B.Creating an IAM administrator
    • C.Closing the whole AWS account✓ Answer
    • D.Listing the account's IAM users

    Closing a standalone account is reserved for root credentials because it affects the entire account. Creating or listing IAM identities and updating contact details can all be delegated to IAM identities with the right permissions.

    Ref QB-HAFB82Source: IAM User Guide, Tasks that require root user credentialsReport a problem with this question

  12. 12. Which task requires signing in as the root user of a standalone AWS account?

    • A.Creating an IAM role that has administrator permissions
    • B.Changing the AWS Support plan the account subscribes to
    • C.Changing the primary sign-in email address of the account itself✓ Answer
    • D.Changing the alternate contacts for billing and security

    The root user's email address is its own sign-in credential, so on a standalone account only root can change it. Alternate contacts and the Support plan can now be managed with IAM permissions, and creating a role is ordinary IAM administration.

    Ref QB-3TYTY3Source: IAM User Guide, Tasks that require root user credentials; AWS Support User Guide, Changing AWS Support plansReport a problem with this question

  13. 13. A company wants its IAM users to sign in with the multi-factor authentication (MFA) type that best resists phishing. Which should it choose?

    • A.Passkeys or FIDO security keys, which tie each sign-in to the real AWS website✓ Answer
    • B.Hardware TOTP tokens, which show six-digit codes that only the holder can ever read
    • C.Text message codes sent to each user's phone, which IAM accepts as a new MFA type
    • D.Virtual authenticator apps, which show six-digit codes that cannot be retyped elsewhere

    AWS recommends passkeys and FIDO security keys because they are phishing resistant: the credential responds only to the genuine site. A six-digit code from an app or a hardware token can be typed into a fake site, and SMS is no longer available as a new IAM MFA option.

    Ref QB-JATND3Source: IAM User Guide, AWS multi-factor authentication in IAMReport a problem with this question

  14. 14. A company runs many AWS accounts under AWS Organizations and wants employees to use one sign-in, based on their existing corporate directory, to reach the accounts assigned to them. Which service fits?

    • A.Amazon Cognito, which gives customers of web and mobile apps sign-up and sign-in pages
    • B.AWS Resource Access Manager, which shares resources across accounts in an organization
    • C.AWS Directory Service, which hosts managed directories that companies use for identities
    • D.AWS IAM Identity Center, which gives workforce users central access to AWS accounts✓ Answer

    IAM Identity Center is AWS's solution for connecting workforce users to accounts across an organization, using its own directory, Active Directory, or an external SAML 2.0 provider as the identity source. Cognito serves customers of applications, AWS RAM shares resources, and Directory Service supplies a directory rather than a sign-in portal.

    Ref QB-YSWTFYSource: AWS IAM Identity Center User Guide, What is IAM Identity Center?Report a problem with this question

  15. 15. In AWS IAM Identity Center, an administrator wants to define the access for a database administrator job function once and then assign it to people across several accounts. Which feature does this?

    • A.Service-linked roles, which an AWS service owns and uses for its own actions
    • B.Permission sets, which define a job function's access and apply it across accounts✓ Answer
    • C.Inline policies, which embed a job function's access in one identity at a time
    • D.IAM user groups, which collect the IAM users of one account under shared policies

    Permission sets describe the access for a job function, and Identity Center provisions them into each assigned account, where they take effect as IAM roles. Identity Center is the sign-in and assignment layer, and roles remain the underlying permission mechanism that gives users short-term credentials. Service-linked roles belong to an AWS service, inline policies sit in one identity, and IAM user groups work within one account.

    Ref QB-FARNVXSource: AWS IAM Identity Center User Guide, Permission setsReport a problem with this question

  16. 16. A startup is building a mobile shopping app and wants its customers to sign up and sign in, including with their Google or Apple accounts. Which is the best fit?

    • A.AWS IAM Identity Center, because it signs every customer in through one access portal
    • B.Amazon Cognito, because it is built for the end users of web and mobile apps✓ Answer
    • C.AWS Directory Service, because it keeps each customer in a managed Active Directory
    • D.IAM users, because each customer can then hold a password and an access key

    Cognito is the identity platform for customer web and mobile apps: user pools handle sign-up, sign-in, and social providers such as Google and Apple, and identity pools can exchange a token for temporary AWS credentials. IAM Identity Center serves the workforce, and IAM users are not meant for application customers.

    Ref QB-ZS96NZSource: Amazon Cognito Developer Guide, What is Amazon Cognito?Report a problem with this question

  17. 17. Which statement correctly describes federation as a type of identity management in AWS?

    • A.Users keep identities from an external provider and get temporary credentials through a role✓ Answer
    • B.Users move identities from an external provider into IAM users with long-term passwords
    • C.Users share one IAM user per department while an external provider rotates its access keys
    • D.Users receive access keys from an external provider and embed them in their applications

    Federation establishes trust between an external identity provider and AWS, so people sign in with their existing identities and AWS issues temporary credentials through a role. That removes the need for an IAM user per person or for long-term keys embedded in applications.

    Ref QB-GA4Z2ZSource: IAM User Guide, Identity providers and federation into AWSReport a problem with this question

  18. 18. A company wants a managed Microsoft Active Directory on AWS, which it can later use as the identity source for AWS IAM Identity Center. Which service provides it?

    • A.AWS Resource Access Manager, because it shares identities and directories between accounts
    • B.Amazon Cognito, because its user pools run Active Directory domains for the workforce
    • C.AWS Secrets Manager, because it stores and manages the directory's users and passwords
    • D.AWS Directory Service, because it offers a managed Microsoft Active Directory✓ Answer

    AWS Directory Service supplies managed directories such as AWS Managed Microsoft AD, and a directory like that can act as an identity source for IAM Identity Center. It is a directory, not a single sign-on portal; Cognito serves app customers, AWS RAM shares resources, and Secrets Manager stores secrets rather than user directories.

    Ref QB-WS765WSource: AWS Directory Service Administration Guide, What is AWS Directory Service?Report a problem with this question

  19. 19. An administrator sets a custom IAM account password policy that requires longer passwords. What does this policy apply to?

    • A.Passwords of IAM users in the account, but not the root password or any access keys✓ Answer
    • B.Passwords of IAM users and the root user, but not the access keys of either identity
    • C.Passwords of every identity in the organization, including its member accounts' users
    • D.Passwords and access keys of IAM users, but not the credentials of the root user

    The IAM account password policy governs only the passwords of IAM users in that account. It does not cover the root user's password or access keys, which is why an expired IAM password blocks console sign-in while the user's access keys keep working.

    Ref QB-DA2ZHVSource: IAM User Guide, Set an account password policy for IAM usersReport a problem with this question

  20. 20. A developer has lost the secret access key from an IAM user's access key pair. What should the developer do?

    • A.Retrieve the secret from the IAM console, because AWS keeps it available for each user
    • B.Ask the root user to view it, because the root user can read any user's stored secret
    • C.Open an AWS Support case to recover it, because Support can reissue the original secret
    • D.Delete the access key and create a new one, because the secret is shown only at creation✓ Answer

    An access key is a long-term credential made of an access key ID and a secret access key, and the secret can be retrieved only when the key is created. Once lost it cannot be recovered by anyone, so the key must be deleted and replaced; allowing two keys per user makes that swap possible without downtime.

    Ref QB-PHWM8ASource: IAM User Guide, Manage access keys for IAM usersReport a problem with this question

  21. 21. An application's database password must be kept out of the code and changed automatically on a schedule. Which service is designed for this?

    • A.AWS Secrets Manager, which stores the password and rotates it on a schedule✓ Answer
    • B.AWS Systems Manager Parameter Store, which rotates encrypted values on a schedule
    • C.AWS Key Management Service (AWS KMS), which stores the password and changes its value
    • D.AWS Certificate Manager (ACM), which renews passwords as it renews certificates

    Secrets Manager replaces hard-coded credentials with a runtime call and can rotate them automatically. Parameter Store has no credential rotation, AWS KMS manages encryption keys rather than the secrets themselves, and ACM handles certificates.

    Ref QB-724TTASource: AWS Secrets Manager User Guide, What is AWS Secrets Manager?Report a problem with this question

  22. 22. A team wants a central, hierarchical store for non-secret application settings, such as environment names and service endpoints, and it does not need rotation. Which option fits best?

    • A.AWS Config, a service for recording how the settings of AWS resources change over time
    • B.AWS Secrets Manager, a service mainly for storing and rotating credentials and API keys
    • C.AWS Systems Manager Parameter Store, a capability for keeping application configuration data✓ Answer
    • D.AWS Key Management Service (AWS KMS), a service for creating and controlling encryption keys

    Parameter Store, a capability of AWS Systems Manager, is a centralized configuration store with hierarchies, which suits plain settings that need no rotation. AWS recommends Secrets Manager for secrets, AWS KMS manages encryption keys, and AWS Config tracks the configuration of AWS resources rather than storing application settings.

    Ref QB-QH9YDBSource: AWS Systems Manager User Guide, AWS Systems Manager Parameter StoreReport a problem with this question

Other topics in this exam

Practice questions built from the domains and task statements in the published AWS exam guide (CLF-C02). AWS and AWS Certified Cloud Practitioner are trademarks of Amazon.com, Inc. or its affiliates; this site is not affiliated with or endorsed by Amazon Web Services, and these are not real exam questions. Fees, scoring, exam languages, Support plans, service names and prices change over time — confirm the current details on the AWS website before you book. The real exam also has multiple-response questions, which this single-answer practice does not reproduce. AWS exam guide (CLF-C02) →