What is an AWS IAM role?
⚡
Quick Answer
An IAM role is a set of permissions that can be assumed temporarily by a trusted entity — an AWS service, an EC2 instance, or a federated user — without long-lived credentials.
Detailed Answer
Roles grant short-lived, automatically rotated credentials via STS, which is far safer than embedding access keys. Common uses: an EC2 instance profile or an EKS pod (IRSA) assuming a role to call AWS APIs, or cross-account access. They are central to least-privilege design.
💡
Interview Tip
Emphasize temporary credentials (no long-lived keys) and least privilege — the security reason roles exist.
awsiamsecurity