Course contentsShow
← Cloud and Infrastructure
Lesson 345 of 2,9897. Identity and Access ManagementFree lesson

Users vs Service Accounts

Understand the distinction between human user identities and programmatic service accounts in cloud IAM.

Users vs Service Accounts

What you'll learn: How cloud IAM distinguishes between human identities and programmatic identities—and why that matters for security.


The Core Distinction

In cloud IAM, there are two fundamentally different types of identities:

Users represent human beings who log in interactively—engineers, administrators, analysts. They authenticate with passwords, MFA devices, or federated SSO. Users typically work through consoles, CLIs, or APIs manually.

Service accounts (also called service principals or machine identities) represent applications, scripts, and automated processes. They authenticate with access keys, certificates, or tokens. Service accounts enable your code to interact with cloud resources programmatically without human intervention.


Why Separate Them?

Think of it like the difference between an employee badge and a delivery truck's credentials. Both need access to your building, but they have different purposes, durations, and risk profiles.

Users:

  • Need interactive permissions (read dashboards, modify settings)
  • Require MFA for security
  • Should be auditable to specific people
  • Have unpredictable access patterns

Service accounts:

  • Need narrow, automated permissions (write logs, read databases)
  • Authenticate via rotating keys or short-lived tokens
  • Represent applications, not individuals
  • Have predictable, repeatable access patterns

Mixing these up—like giving your EC2 instance a user's credentials—violates the Principle of Least Privilege and creates audit nightmares. Who accessed that database: the human or the application?


Real-World Example

A data pipeline that runs nightly should use a service account with only the permissions needed to read source data and write reports—not your personal user account.

Key Takeaway: Users are for humans; service accounts are for code. Keeping them separate improves security, auditability, and credential management.