In this practical hands-on IAM (Identity and Access Management) project on AWS, I will control access to AWS using IAM users, groups, roles, and policies to secure AWS resources like EC2 and S3.
IAM is like the security guard of one AWS account. It defines who can do what to which resources. IAM uses:
- Users – individual accounts
- Groups – teams of users
- Roles – temporary access or service permissions
- Policies – rulebooks that define what actions are allowed
- Create and manage IAM users, groups, and policies
- Understand and apply IAM best practices
- Assign access permissions for EC2 and S3 services
- Go to IAM > Policies
- Click Create Policy
- Choose Service: EC2
- Select All EC2 actions and All Resources
- Click Next > Create Policy
- Go to IAM > Users > Click Create User
- Username:
Eric - Enable Console Access, set a password
- Check: User must reset password at next sign-in
- Attach the policy you just created (
policy_for_eric)
| Issue | Solution |
|---|---|
| Can't find EC2 policy | Use filter: Customer managed |
| Login fails for Eric | Check password and console access |
- Navigate to IAM > User Groups
- Name:
development-team - Click Create Group
- Go to Users > Create User
- Usernames:
Jack, thenAde - Add them to development-team group
- Go to Policies > Create Policy
- Choose services: EC2 and S3
- Allow All Actions, All Resources
- Name:
development-policy
- Go to User Groups > development-team
- Click Add Permissions > Attach Policy
- Filter: Customer Managed > Select
development-policy
- 🔐 Use least privilege: grant only what's needed
- 📁 Use groups to manage permissions efficiently
- 🔄 Rotate passwords and use strong password policies
- 🕵️ Enable MFA (Multi-Factor Authentication) for critical users
- 📜 Use customer-managed policies for clarity and reuse
- 🧪 Always test policies before wide application
- Users = permanent access (your own house key)
- Roles = temporary/assigned access (guest key with time limits)
aws iam list-usersaws iam list-groupsaws iam list-attached-group-policies --group-name development-teamThis project helped to:
- Understand IAM concepts by analogy and action
- Apply IAM policies to individual users and groups
- Use best practices to manage access securely in AWS
This project helped me to be more confident in managing cloud security using IAM!




