What You Will Learn
Beginner
- What IAM is and why it matters
- Users, groups, roles, and policies
- The principle of least privilege
IAM hierarchy: Account contains Users, Roles, Groups — all controlled by Policies (JSON)
| Entity | What it is |
|---|---|
| User | A person or application that needs access |
| Group | Collection of users (e.g., "Developers") |
| Role | Temporary access for AWS services or cross-account |
| Policy | JSON document defining permissions |
Least privilege
Give users the minimum permissions they need. Never give s3:* when they only need s3:GetObject on one bucket.Policy examplejson
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:GetObject"],
"Resource": "arn:aws:s3:::my-bucket/*"
}]
}Practical Exercise
Go to IAM in AWS Console
Create a new IAM user
Create a group called "Developers"
Add the user to the group
Attach a read-only S3 policy to the group
Key Takeaways
- IAM controls who can do what in AWS.
- Users = people/apps. Groups = collections. Roles = temporary access.
- Policies are JSON documents defining permissions.
- Always follow least privilege — minimum permissions needed.
- Never use root account for daily work.
Comments
Comments
Post a Comment