Bitzu

CLF-C02 ยท Identity and access management

IAM users, groups and roles

What IAM users, groups and roles are, when to use a role instead of a user (applications, services, cross-account access) and temporary credentials.

Key points

  • An IAM user is an identity with long-term credentials (password, access keys).
  • An IAM group is a set of users that share attached policies; it cannot be nested and cannot sign in.
  • An IAM role has no long-term credentials: a trusted user, AWS service, another account or a federated identity assumes it and receives temporary credentials.
  • Prefer roles for applications, services and cross-account access.

Source: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html

Practice questions

Single choice

Which IAM identity provides temporary security credentials each time it is assumed?

  1. IAM user
  2. IAM group
  3. IAM role
  4. AWS account root user
Show answer

Answer: C. IAM role

A role has no password or access keys of its own; assuming it returns temporary credentials for the session. Users have long-term credentials, and a group is only a container for users.

Select all that apply

Which statements about IAM user groups are true?

  1. One IAM user can be a member of more than one group
  2. A group can contain other groups to build a hierarchy
  3. Policies attached to a group apply to all of its users
  4. Every new IAM user is placed in a default all-users group
  5. A group can be named as the principal in a bucket policy
Show answer

Answer: A. One IAM user can be a member of more than one group, C. Policies attached to a group apply to all of its users

A user can belong to several groups, and policies attached to a group apply to every member. Groups cannot contain other groups, there is no built-in group holding every user, and a group cannot be named as a principal because it cannot authenticate.

True or false

An IAM role has its own permanent password and access keys, just like an IAM user.

Show answer

Answer: False

False. A role has no standard long-term credentials. Whoever assumes it receives temporary security credentials for the session, which is exactly why roles are preferred for workloads.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CLF-C02 topics in this module