IAM Roles vs. Policies

Difficulty: Intermediate

Question

Explain the difference between an IAM Role, an IAM User, and an IAM Policy.

Answer

- **IAM User**: A persistent identity created for a person or service. - **IAM Policy**: A JSON document that defines permissions. - **IAM Role**: An identity that is 'assumed' by anyone who needs it (like an EC2 instance), providing temporary credentials.

Concepts covered

IAM, Role, Policy, Least Privilege, Trust Relationship