IAM defines access; STS issues sessions
How IAM's responsibility for defining roles, trust, and permissions differs from STS's responsibility for issuing temporary session credentials. · associate
AWS Identity and Access Management (IAM) maintains the definitions that govern access to AWS resources. For role-based access, you use IAM to create a role, define who may assume it, and assign its permissions. These definitions persist until you change or delete them.
AWS Security Token Service (AWS STS) issues temporary security credentials. When an authorized caller assumes an IAM role, STS returns credentials for a session using that role. STS does not replace the role or create an independent set of permissions outside IAM's controls.
The important distinction is persistent definition versus temporary session. A role can support many sessions over time. Each session has an expiration, while the role remains available for future authorized use. A persistent role is not a permanent access key.
| Responsibility | IAM | STS |
|---|---|---|
| Role definition | Creates and maintains | Uses existing role |
| Access rules | Defines trust and permissions | Honors applicable rules |
| Session credentials | Role has no permanent keys | Issues temporary credentials |
| Lifetime | Until changed or deleted | Credentials expire |