(Day 02) Task : AWS IAM Deep Dive – Roles, Policies, Users, Groups + IAM Project :-

Aditya SharmaAditya Sharma
4 min read

What is IAM in AWS?

IAM (Identity and Access Management) is a free AWS service that helps you:

  • Securely control access to AWS resources

  • Define who (users, groups, roles) can access what (services, resources) and how (read, write, delete, etc.)

  • AWS IAM (Identity and Access Management) is a service provided by Amazon Web Services (AWS) that helps you manage access to your AWS resources. It's like a security system for your AWS account.

  • IAM allows you to create and manage users, groups, and roles. Users represent individual people or entities who need access to your AWS resources. Groups are collections of users with similar access requirements, making it easier to manage permissions. Roles are used to grant temporary access to external entities or services.

  • With IAM, you can control and define permissions through policies. Policies are written in JSON format and specify what actions are allowed or denied on specific AWS resources. These policies can be attached to IAM entities (users, groups, or roles) to grant or restrict access to AWS services and resources.

  • IAM follows the principle of least privilege, meaning users and entities are given only the necessary permissions required for their tasks, minimizing potential security risks. IAM also provides features like multi-factor authentication (MFA) for added security and an audit trail to track user activity and changes to permissions.

  • By using AWS IAM, you can effectively manage and secure access to your AWS resources, ensuring that only authorized individuals have appropriate permissions and actions are logged for accountability and compliance purposes.

  • Overall, IAM is an essential component of AWS security, providing granular control over access to your AWS account and resources, reducing the risk of unauthorized access and helping maintain a secure environment.

Why is IAM Important in DevOps?

As a DevOps engineer:

  • You automate provisioning with secure roles.

  • Use temporary access via IAM Roles (instead of hardcoding credentials).

  • Define least-privilege policies for tools like Jenkins, Terraform, and Ansible.

  • Rotate credentials safely using IAM best practices.

IAM Core Components :

ComponentDescription
UserAn identity with long-term credentials (login + password or access keys)
GroupCollection of users with shared permissions
PolicyJSON documents that define what actions are allowed or denied
RoleTemporary access identity that can be assumed by users, apps, EC2, Lambda, etc.
Access KeysProgrammatic credentials (for CLI, SDK)
MFA (Multi-Factor Auth)Adds a second layer of protection

Users: IAM users represent individual people or entities (such as applications or services) that interact with your AWS resources. Each user has a unique name and security credentials (password or access keys) used for authentication and access control.

Groups: IAM groups are collections of users with similar access requirements. Instead of managing permissions for each user individually, you can assign permissions to groups, making it easier to manage access control. Users can be added or removed from groups as needed.

Roles: IAM roles are used to grant temporary access to AWS resources. Roles are typically used by applications or services that need to access AWS resources on behalf of users or other services. Roles have associated policies that define the permissions and actions allowed for the role.

Policies: IAM policies are JSON documents that define permissions. Policies specify the actions that can be performed on AWS resources and the resources to which the actions apply. Policies can be attached to users, groups, or roles to control access. IAM provides both AWS managed policies (predefined policies maintained by AWS) and customer managed policies (policies created and managed by you).

IAM Hands-On Practicals :-

Let’s do it the real DevOps way — hands-on from the AWS Console and CLI.

1. Create a New IAM User :

Console Steps:

  1. Go to IAM → Users → Add User.

  2. Name: test-user.

  3. Specify user details.

  4. Set Autogenerated password.

  5. Assign policy: AdministratorAccess (for now).

  6. Create group.

User’s Dashboard :

2. Create IAM Groups :

Steps:

  • IAM → Groups → Create Group.

  • Add users + policies accordingly.

0
Subscribe to my newsletter

Read articles from Aditya Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aditya Sharma
Aditya Sharma

DevOps Enthusiast | Python | Chef | Docker | GitHub | Linux | Shell Scripting | CI/CD & Cloud Learner | AWS