Skip to main content

Command Palette

Search for a command to run...

How to Create an IAM User, Group, and Attach Policies in AWS

Updated
3 min read
How to Create an IAM User, Group, and Attach Policies in AWS
H
Aspiring software engineer with a strong interest in AWS, cloud computing, and web technologies. Focused on learning new skills, building practical projects, and growing as a technology professional.

Introduction

AWS Identity and Access Management (IAM) helps you securely manage access to AWS services and resources. Using IAM, you can create users, organize them into groups, and assign permissions through policies.

Official AWS Documentation:

Step 1: Log in to AWS Console

  1. Open the AWS Management Console.

  2. Search for IAM in the search bar.

  3. Click on IAM to open the dashboard.

Step 2: Create an IAM Group

IAM Groups help manage permissions for multiple users.

Steps

  1. In the IAM Dashboard, click User Groups.

  2. Click Create Group.

  3. Enter a group name.

Example:

Developers
  1. Click Next.

  2. Skip permissions for now (or attach policies if required).

  3. Click Create Group.

The group is now created successfully.

Step 3: Create an IAM User

Steps

  1. In the IAM Dashboard, click Users.

  2. Click Create User.

  3. Enter a username.

Example:

developer-user
  1. Select the access type:
  • AWS Management Console Access

  • Programmatic Access (CLI/API)

  1. Set a custom password or auto-generated password.

  2. Click Next.

Reference:

Create IAM Users Guide

Step 4: Add User to Group

  1. Select Add user to group.

  2. Choose the group you created earlier.

Example:

Developers
  1. Click Next.

This automatically grants the permissions assigned to the group.

Step 5: Review User Details

  1. Review all configurations.

  2. Click Create User.

AWS will create the IAM user.

Step 6: Create an IAM Policy

Policies define what actions users can perform.

Steps

  1. In IAM Dashboard, click Policies.

  2. Click Create Policy.

  3. Choose:

    • Visual Editor

    • JSON Editor

  4. Select a service.

Example:

Amazon EC2
  1. Select permissions:
Start Instances
Stop Instances
Describe Instances
  1. Click Next.

  2. Enter policy name.

Example:

EC2-Management-Policy
  1. Click Create Policy.

Reference:

AWS IAM Policies Guide

Step 7: Attach Policy to Group

Steps

  1. Go to User Groups.

  2. Select your group.

  3. Open the Permissions tab.

  4. Click Add Permissions.

  5. Select Attach Policies.

  6. Search for your policy.

Example:

EC2-Management-Policy
  1. Select the policy.

  2. Click Add Permissions.

Now every user in that group receives the assigned permissions.

Step 8: Verify Permissions

  1. Open Users.

  2. Select the IAM user.

  3. Click Permissions.

  4. Verify that permissions are inherited from the group.

Architecture Flow

IAM Policy
     ↓
 IAM Group
     ↓
 IAM User
     ↓
 Access AWS Resources