Hey Dev.to Family! ๐
In this article, we'll explore AWS IAM (Identity and Access Management) โ a foundational AWS service that helps you securely manage who can access your resources and what actions they can perform. If you're starting your AWS cloud journey, IAM is where it all begins.
๐ Table of Contents
- What is IAM?
- Why Do We Need IAM?
- Key Components of IAM
- Hands-On IAM: Creating User, Group, and Permissions
- IAM Use Case Example
- Conclusion
๐ก๏ธ What is IAM?
IAM (Identity and Access Management) is a secure AWS service that allows you to:
- Manage users, groups, roles, and policies
- Control who can access what in your AWS account
Think of IAM as the security gatekeeper for your cloud infrastructure.
โ Why Do We Need IAM?
IAM solves multiple security problems:
- โ Granular access control (least privilege)
- โ No need to share passwords
- โ Temporary and limited access for apps and users
IAM makes your AWS environment secure, manageable, and scalable.
๐งฉ Key Components of IAM
๐ค 1. Users
- Represents an individual person or app
- Gets username, password, and/or access keys
- Example: A developer who logs into AWS console
๐ฅ 2. Groups
- A collection of IAM users
- You apply permissions to the group โ all users in the group inherit them
- Example:
Development-Teamgroup with EC2/S3 access
๐ 3. Policies
- JSON documents that define permissions
- Attached to users, groups, or roles
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*"
}
๐งโ๐ผ 4. Roles
- Used to grant temporary access
- Best for EC2, Lambda, or cross-account access
- No username or password โ trust-based
๐ ๏ธ Hands-On IAM: Creating User, Group, and Permissions
Hereโs a real-world setup:
- ๐ค User Created:
test-user-101 - ๐ฅ Group Created:
Development-Team - ๐ Policy Attached:
AmazonEC2FullAccess,AmazonS3FullAccess - โ User added to group and inherited access
๐ป Screenshots:

Adding our new user test-user-101 to the Development-Team group.

Verifying that the correct permissions are attached to the Development-Team group.
๐งช IAM Use Case Example
Scenario: A developer needs access only to EC2 and S3.
๐ ๏ธ Steps:
- Create user
dev-user - Create group
dev-team - Attach S3 + EC2 policies to the group
- Add
dev-usertodev-team
โ
Now dev-user has access to EC2 and S3 โ nothing else.
๐ Bonus: EC2 to S3 Access Using Roles
- Create a role with
AmazonS3FullAccess - Attach the role to an EC2 instance
- EC2 now has temporary S3 access without access keys
๐ Conclusion
IAM is not just an AWS service โ itโs the foundation of cloud security.
With IAM, you gain:
- ๐ Better security control
- ๐งผ Clean access management
- ๐ Scalable permission model for teams and services
๐ Letโs Connect!
๐ท๏ธ Tags:
#AWS #IAM #CloudSecurity #DevOps #TechBlog #SharjilLearnsCloud
Top comments (0)