Understanding IAM Roles vs Users vs Groups
A crisp mental model for AWS identity primitives — with common pitfalls.
Series
AWS Foundations
IAM Roles vs Users vs Groups
Users are long-lived identities with credentials. Groups attach policies to sets of users. Roles are short-lived, assumable identities — the right primitive for services, EC2, Lambda, cross-account access.
Rule of thumb
If a human logs in occasionally — User in a Group. If a machine or service needs credentials — Role.
Assume-role trust example
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {"Service": "lambda.amazonaws.com"},
"Action": "sts:AssumeRole"
}]
}
Keep reading
You may also like
aws
AWS S3 Bucket Best Practices for Production
Ten field-tested rules for locking down, versioning and scaling S3 buckets in production workloads.
aws
Deploy a Container on AWS: Dockerfile → ECR → ECS Fargate
The complete story of getting a Docker container to run on AWS with zero servers to patch — starts here.
aws
ECS Part 1: Write the Dockerfile & Configure AWS CLI
A minimal Apache Dockerfile + creating an IAM user with ECR permissions + configuring `aws configure`.
Discussion (0)
No comments yet. Be the first to weigh in.