Users, roles and sessions
An IAM user is a persistent identity that can have long-term credentials; a role is assumed to obtain temporary credentials. Human federation and service roles reduce reliance on stored access keys. A role’s trust policy governs who may assume it, while permission policies govern what its resulting session may do. An EC2 instance role can supply temporary credentials to an application through the supported credential provider rather than embedding an IAM user access key in the application’s configuration file or image distributed to every server running the workload. Distinguishing trust from permissions prevents granting useful actions to a role that nobody appropriate can assume, or allowing an inappropriate principal to assume a role whose permissions would then become available for unintended operations against account resources. Attaching an S3 permission policy alone does not authorize a caller to assume a role; review trust relationships separately and avoid creating static keys as the first workaround for every role-assumption failure encountered during setup.
An EC2 instance role can supply temporary credentials to an application through the supported credential provider rather than embedding an IAM user access key in the application’s configuration file or image distributed to every server running the workload.
Distinguishing trust from permissions prevents granting useful actions to a role that nobody appropriate can assume, or allowing an inappropriate principal to assume a role whose permissions would then become available for unintended operations against account resources.
Attaching an S3 permission policy alone does not authorize a caller to assume a role; review trust relationships separately and avoid creating static keys as the first workaround for every role-assumption failure encountered during setup.