- LPU MCA Semester 1
- CAP470
- Unit 8
CAP470 · Unit 8: AWS authentication and authorization
IAM users, groups and roles
12 practice questions · in the ETE syllabus
Key points
- Users have long-term credentials; roles have temporary ones
- Groups manage many users and cannot be nested
- Roles need a permissions policy and a trust policy
- Protect the root user with MFA
An IAM user is an identity for one person or application, with its own name and credentials (a console password and/or access keys). An IAM group is a collection of users, used to manage permissions for many users at once: policies attached to the group apply to every member. A user can belong to several groups, and permissions from all groups combine, but a group cannot contain another group and a group cannot sign in.
An IAM role is an identity with permissions that is assumed temporarily by users, applications or AWS services. Assuming a role returns temporary credentials issued by the AWS Security Token Service (STS), so no long-term keys are stored. A role has two kinds of policy: a permissions policy (what it can do) and a trust policy (who may assume it).
| Identity | Credentials | Typical use |
|---|---|---|
| User | Long-term (password, access keys) | A person or application |
| Group | None | Manage many users |
| Role | Temporary (via STS) | EC2 instances, cross-account access, short-term access |
The root user has complete access to the account, so protect it with MFA and use it only for the few tasks that require it.
Exam trap: for an application on an EC2 instance, use a role, not access keys stored in the code.
Try two questions
Which AWS service issues the temporary credentials that are used when a role is assumed?
- AWS Security Token Service (STS)
- Amazon S3
- Amazon CloudFront
- Amazon Route 53
Show the answer
A. STS returns temporary access keys and a session token.
Why not B: S3 stores objects.
Why not C: CloudFront delivers content.
Why not D: Route 53 provides DNS.
A user is a member of two groups. One group allows reading S3 and the other allows writing to S3. What are the user's permissions?
- Only the permissions of the first group
- Only the permissions of the second group
- No permissions, because the groups conflict
- The combined permissions of both groups
Show the answer
D. Policies from every group (and the user) are evaluated together.
Why not A: Permissions from all groups are combined.
Why not B: Permissions from all groups are combined.
Why not C: Allows from different groups add up unless a deny applies.