An IAM user is a permanent identity representing a person or application. It has a fixed set of long-term credentials: a password for console access and/or access keys (Access Key ID + Secret Access Key) for programmatic access.
An IAM group is a collection of IAM users. Policies attached to a group apply to all users in it.
An IAM role is an identity with a permission policy that can be assumed by trusted entities. Unlike users, roles do not have permanent credentials. When assumed, AWS STS (Security Token Service) issues temporary credentials that expire automatically.
Roles vs. Users
| IAM User | IAM Role | |
|---|---|---|
| Credentials | Permanent (access keys, password) | Temporary (STS tokens, expire automatically) |
| Who uses it | Human or hardcoded application | Services, applications, other accounts, federated identities |
| Best for | Console access for humans | EC2 instances, Lambda, cross-account access, SSO |
Key role concepts: