ExitAWS STS vs AWS IAM: Temporary sessions and persistent access definitions1 / 7
Explanation

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.

ResponsibilityIAMSTS
Role definitionCreates and maintainsUses existing role
Access rulesDefines trust and permissionsHonors applicable rules
Session credentialsRole has no permanent keysIssues temporary credentials
LifetimeUntil changed or deletedCredentials expire