Principals, roles and trust
Who is making the request?
A principal is the identity making an AWS request. Authentication establishes the identity; authorization decides whether that identity may perform the requested action. A signed-in employee can still be denied access to a file. IAM (Identity and Access Management) helps define these permissions.
Users, groups and roles
An IAM user is an identity in an account. IAM groups organize users and can carry permissions; a group is not itself a principal that signs requests. A role is an identity that authorized people or workloads can assume. It does not have its own permanent access keys. AWS recommends federation and temporary credentials for people, and roles for workloads, rather than routine long-lived IAM user credentials.
Trust is different from permissions
Imagine a bookstore report worker. Its role trust policy determines which principal is allowed to assume the role, subject to other applicable authorization rules. The role permissions policy determines what actions the resulting session may perform. Granting permission to read reports does not itself let a person assume the role. Conversely, being trusted to assume a role does not grant every AWS action.
Offline diagram: caller → role assumption authorization → temporary session → request authorization → report.
Temporary sessions
AWS Security Token Service (STS) issues temporary security credentials through supported operations such as AssumeRole. A session has a limited lifetime; the credentials include a session token as well as an access key ID and secret access key. Temporary does not mean harmless: protect all credentials and never paste them into code or logs. IAM Identity Center can provide workforce access to AWS accounts. For an application, choose a dedicated role appropriate to its execution environment.
Practice without signing in
A report reader and an upload worker need different permissions. Draw two roles, identify who should be trusted to use each, and identify what each should do. Reject the idea of sharing one permanent administrator key. Do not create identities or contact AWS for this exercise. Next: write a narrowly scoped policy.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Principals, roles and trust — knowledge check
Apply IAM concepts in fictional offline scenarios.
An employee signs in successfully but cannot read a report. Which check may have failed?
Which identity is appropriate for a report-processing workload?
Which policy defines who may assume a role?
What does an IAM group provide?
A role session expires. What is the appropriate response?