Lesson 02 β Introduction to AWS Identity & Access Management (IAM)
Learning Path
βοΈ Phase 2 β AWS Cloud Security
π Module 02 β Identity & Access Management (IAM)
π― Lesson Objective
Section titled βπ― Lesson ObjectiveβBy the end of this lesson, you will be able to:
- Explain what AWS IAM is.
- Understand how IAM secures AWS resources.
- Differentiate Authentication and Authorization.
- Understand IAM Users, Groups, Roles and Policies.
- Understand how AWS evaluates access requests.
- Explore the IAM Console.
- Use AWS CLI to inspect IAM resources.
π Lesson Information
Estimated Time: 2.5 Hours
Difficulty: Beginner
Prerequisites: Module 01 Completed
Hands-on Lab: Yes
Assignment: Yes
πΌ Business Value
Section titled βπΌ Business ValueβImagine CloudNova Technologies has over:
- 700 Employees
- 40 Developers
- 15 DevOps Engineers
- 10 Security Engineers
- 6 SOC Analysts
- 20 Consultants
Without IAM:
- Everyone could access everything.
- Sensitive customer data could be exposed.
- Developers could accidentally delete production systems.
- Compliance requirements would fail.
IAM ensures the right people have the right access at the right time.
π’ In the Company
Section titled βπ’ In the CompanyβYou have officially joined CloudNova Technologies as a Cloud Security Engineer.
Your manager assigns your first project.
βBefore we deploy anything else in AWS, I want you to understand IAM. Every service we use depends on it.β
Your goal today is to understand how AWS controls access.
π What is IAM?
Section titled βπ What is IAM?βAWS Identity and Access Management (IAM) is the service that controls who can access AWS resources and what actions they are allowed to perform.
IAM enables you to:
- Create identities
- Assign permissions
- Control authentication
- Manage authorization
- Audit access
- Secure AWS resources
Think of IAM as the security gatekeeper for AWS.
π’ Real-World Analogy
Section titled βπ’ Real-World AnalogyβImagine an office building.
The building has:
- Reception
- Employee ID cards
- Security Guards
- Restricted Rooms
- Server Room
Employees cannot simply walk into every room.
Their access depends on:
- Identity
- Department
- Job Role
- Permission
AWS IAM works the same way.
π Authentication
Section titled βπ AuthenticationβAuthentication answers one question:
Who are you?
Authentication methods include:
- Username & Password
- Access Keys
- MFA
- AWS IAM Identity Center
- Temporary Credentials
Example:
Username
β
Password
β
MFA
β
Verified Identityβ Authorization
Section titled ββ AuthorizationβAuthorization answers another question:
What are you allowed to do?
Example
Developer
Allowed
- Launch EC2
- View CloudWatch
- Upload to S3
Not Allowed
- Delete IAM Users
- Close AWS Account
- Modify Billing
IAM Policies define these permissions.
π Authentication vs Authorization
Section titled βπ Authentication vs Authorizationβ| Authentication | Authorization |
|---|---|
| Who are you? | What can you do? |
| Verify identity | Verify permissions |
| Login | Access control |
| Username | IAM Policy |
| Password | Allow / Deny |
Both are required before AWS allows an action.
π§© IAM Components
Section titled βπ§© IAM ComponentsβAWS IAM consists of several core components.
IAM
β
βββ Users
βββ Groups
βββ Roles
βββ Policies
βββ Identity Providers
βββ MFA
βββ Access AnalyzerThese components work together to secure AWS environments.
π€ IAM Users
Section titled βπ€ IAM UsersβIAM Users represent individual people or applications that require long-term access.
Examples:
- Rohit
- Alice
- Bob
- Cloud Administrator
Users can have:
- Passwords
- Access Keys
- MFA Devices
- Policies
π₯ IAM Groups
Section titled βπ₯ IAM GroupsβGroups simplify permission management.
Instead of assigning permissions to each user individually, permissions are assigned to groups.
Example
Developers
β
EC2 Access
β
CloudWatch Access
β
S3 Read AccessEvery developer inherits the same permissions.
π IAM Roles
Section titled βπ IAM RolesβRoles are temporary identities.
Roles are commonly used by:
- EC2
- Lambda
- ECS
- EKS
- Cross-Account Access
Roles do not have passwords.
Roles issue temporary credentials.
π IAM Policies
Section titled βπ IAM PoliciesβPolicies are JSON documents.
They define permissions.
Example
Allow
β
s3:GetObject
β
Specific BucketPolicies answer questions like:
- Which service?
- Which action?
- Which resource?
- Under what conditions?
π Principle of Least Privilege
Section titled βπ Principle of Least PrivilegeβEvery identity should receive only the permissions necessary to perform its job.
Example
Developer
Needs
- Start EC2
- Stop EC2
- Read S3
Does NOT Need
- Delete IAM Users
- Modify Billing
- Delete KMS Keys
Least Privilege reduces attack surface.
π How IAM Works
Section titled βπ How IAM WorksβUser
β
Login
β
Authentication
β
IAM Policy Evaluation
β
Allowed?
β
YES
β
AWS Service
β
NO
β
Access DeniedEvery AWS request follows this process.
π AWS IAM Dashboard
Section titled βπ AWS IAM DashboardβNavigate to:
AWS Console
β
IAM
β
DashboardReview:
- Users
- Groups
- Roles
- Policies
- Account Summary
- Security Recommendations
Spend time becoming familiar with the interface.
π’ Enterprise Example
Section titled βπ’ Enterprise ExampleβCloudNova Technologies has three teams.
Security Team
Cloud Engineering
DevelopersRequirements:
Security Team
- Full Security Access
Cloud Engineers
- Infrastructure Management
Developers
- Deploy Applications
Each team requires different permissions.
Using IAM Groups and Policies makes this manageable.
π§ͺ Enterprise Mission 01 β Explore IAM Dashboard
Section titled βπ§ͺ Enterprise Mission 01 β Explore IAM DashboardβOpen AWS Console.
Navigate:
AWS Console
β
IAMExplore:
- Dashboard
- Users
- Groups
- Roles
- Policies
- Account Settings
Do not modify anything.
Record what each section is used for.
π§ͺ Enterprise Mission 02 β List IAM Users
Section titled βπ§ͺ Enterprise Mission 02 β List IAM UsersβOpen PowerShell.
Run:
aws iam list-usersQuestions:
- How many users exist?
- Who created them?
- Are they still required?
π§ͺ Enterprise Mission 03 β List IAM Groups
Section titled βπ§ͺ Enterprise Mission 03 β List IAM Groupsβaws iam list-groupsReview:
- Group Names
- Creation Dates
Questions:
- Which departments could use groups?
π§ͺ Enterprise Mission 04 β List IAM Roles
Section titled βπ§ͺ Enterprise Mission 04 β List IAM Rolesβaws iam list-rolesObserve:
- Role Names
- AssumeRole Policy
- Creation Date
Question:
Why do AWS services prefer Roles over Users?
π§ͺ Enterprise Mission 05 β List IAM Policies
Section titled βπ§ͺ Enterprise Mission 05 β List IAM PoliciesβAWS Managed Policies
aws iam list-policies --scope AWSCustomer Managed Policies
aws iam list-policies --scope LocalQuestions:
- How many AWS Managed Policies exist?
- Are any custom policies present?
π§ͺ Enterprise Mission 06 β View Account Summary
Section titled βπ§ͺ Enterprise Mission 06 β View Account SummaryβRun:
aws iam get-account-summaryReview:
- Users
- Groups
- Roles
- Policies
- MFA Devices
Document your observations.
π§ͺ Enterprise Mission 07 β View Current Identity
Section titled βπ§ͺ Enterprise Mission 07 β View Current IdentityβRun:
aws sts get-caller-identityRecord:
- Account ID
- User ARN
- IAM User
Question:
Am I using an IAM User or another type of identity?
π’ Enterprise Challenge
Section titled βπ’ Enterprise ChallengeβCloudNova plans to hire:
- 120 Developers
- 30 Cloud Engineers
- 12 Security Engineers
- 20 Contractors
- 15 Auditors
Design an IAM strategy.
Questions:
-
Should every person receive AdministratorAccess?
-
How would you organise departments?
-
Which identities should use Roles?
-
Which users require MFA?
Write your recommendations.
π Knowledge Check
Section titled βπ Knowledge Checkβ-
What is AWS IAM?
-
What is Authentication?
-
What is Authorization?
-
What is an IAM User?
-
What is an IAM Group?
-
What is an IAM Role?
-
What is an IAM Policy?
-
Why is Least Privilege important?
-
Which AWS CLI command lists IAM Users?
-
Which command shows your current identity?
π Assignment
Section titled βπ AssignmentβCreate a document titled:
AWS IAM Fundamentals
Include:
- What is IAM?
- Authentication vs Authorization
- IAM Components
- IAM Architecture Diagram
- Enterprise Example
- AWS CLI Commands Used
- Screenshots of the IAM Dashboard
- Lessons Learned
Length:
3β4 Pages
π Lesson Completion Checklist
Section titled βπ Lesson Completion Checklistβ| Task | Status |
|---|---|
| Explored IAM Dashboard | β |
| Listed IAM Users | β |
| Listed IAM Groups | β |
| Listed IAM Roles | β |
| Listed IAM Policies | β |
| Reviewed Account Summary | β |
| Verified Current Identity | β |
| Completed Enterprise Challenge | β |
| Completed Assignment | β |
π‘ Key Takeaways
Section titled βπ‘ Key TakeawaysβAfter completing this lesson, you should understand:
- IAM is the foundation of AWS security.
- Every AWS request is authenticated and authorised.
- IAM consists of Users, Groups, Roles and Policies.
- Least Privilege is a core security principle.
- Roles are generally preferred for AWS services because they use temporary credentials.
- A well-designed IAM strategy is essential for secure enterprise cloud environments.
π Further Reading
Section titled βπ Further Readingβ- AWS IAM User Guide
- AWS IAM Best Practices
- AWS Security Best Practices
- AWS Well-Architected Framework β Security Pillar
- AWS STS Documentation
π Next Lesson
Section titled βπ Next Lessonββ‘οΈ Lesson 03 β IAM Users