Course contentsShow
← Security
Lesson 1712 of 3,05235. Cloud Security - IAMFree lesson

IAM Roles: Federated and Assumable Identities

Master role creation, trust policies, and how roles differ from users for temporary credential access patterns.

IAM Roles: Federated and Assumable Identities

You'll learn how IAM roles enable temporary credential access for federated identities and cross-account scenarios without embedding long-term secrets.

What Makes Roles Different

Unlike IAM users (which have permanent credentials), roles provide temporary security credentials that are assumed on-demand. Think of a role like a uniform: a user doesn't own it permanently—they "wear" it temporarily to perform specific duties, then hand it back.

Core Components

Trust Policy

Every role has a trust policy (also called assume-role policy) that defines who can assume the role. This answers: "Which identities are allowed to wear this uniform?"

Trust policy says: "Allow federated users from Azure AD to assume this role"

Permission Policy

Once assumed, the role grants permissions defined in attached policies. This answers: "What can they do while wearing the uniform?"

Key Use Cases

Federated identities: External identity providers (corporate Active Directory, Google Workspace) authenticate users who then assume roles in your cloud—no need to create duplicate cloud-native user accounts.

Cross-account access: A service in Account A assumes a role in Account B, enabling secure resource sharing without embedding Account B credentials in Account A.

Service-to-service authentication: Applications running on compute instances assume roles automatically, eliminating hardcoded credentials in code.

Why Roles Matter for Security

Roles enforce temporary credentials that automatically expire (typically 1-12 hours). If compromised, the exposure window is limited. This dramatically reduces risk compared to permanent access keys stored in configuration files or environment variables.

Key Takeaway: Roles decouple identity from permanent credentials through trust policies and temporary assumption, enabling secure federated access and service authentication without long-term secrets.