AWS IAM Basics - How to Create Users
Tags: aws, cloud
Published: 2023-10-07 18:00:24

Amazon Web Services (AWS) Identity and Access Management (IAM) is a service that allows you to control access to AWS resources securely. IAM helps you manage users, groups, roles, and their permissions within your AWS environment. 

IAM allows you to centrally manage permissions that govern which AWS resources users have access to. IAM is used to manage who is authenticated (signed in) and authorized (has access to resources).

Managing IAM effectively is crucial for maintaining the security and compliance of your AWS environment. Always follow [AWS security best practices](https://aws.amazon.com/architecture/security-identity-compliance/?cards-all.sort-by=item.additionalFields.sortDate&cards-all.sort-order=desc&awsf.content-type=*all&awsf.methodology=*all) and regularly review and update your IAM policies as your organization's needs evolve.

## How to Create Users with AWS IAM

Here's a practical guide on how to create users with  AWS IAM service:

### 1. Sign in to the AWS Management Console:

Open your web browser and navigate to the AWS Management Console (https://aws.amazon.com/console/).
Sign in with your AWS account credentials.

### 2. Create IAM Users:

IAM users represent individuals or applications that need access to your AWS resources. To create a user:
Go to the IAM dashboard.

![AWS IAM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugzbvv3r9vi9c3eru77j.png)


Click on "Users" in the left navigation pane.

![AWS IAM Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksers9l7o5zxt0iox5ad.png)

Click "Create user" button and follow the wizard to create a new user. 

![IAM Create User](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wi8i8pnj6h4ca0bsdfhy.png)

Enter the username for the IAM user. This is the unique identifier for the user.

![AWS IAM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b95orrgi1umo4m9ehsgi.png)

In the “Set permissions” step, you can assign permissions to the user in one of the following ways:

a. Add user to group: You can add the user to one or more IAM groups that have predefined permissions policies. This is a good practice because it helps you manage permissions centrally by assigning policies to groups rather than individual users.

b. Copy Permissions: Copy all group memberships, attached managed policies, and inline policies from an existing user. 

c. Attach existing policies directly: You can attach one or more AWS managed policies or custom policies directly to the user. AWS provides a wide range of managed policies that cover common use cases. Custom policies are policies you create to define specific permissions for the user.

![AWS IAM Permissions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5x4gmc37m63enkca3if5.png)

For now choose “Add user to group” and click to next button. Review your choices. If everything is fine click the “create user” button. 

3. Enable Console Access to Newly Created User
You can choose to enable programmatic access (which allows the user to interact with AWS services via the AWS CLI, SDKs, or APIs) and/or AWS Management Console access (which allows the user to log in to the AWS Management Console).

To enable AWS management console access click on the user name and navigate to the user dashboard.

In the user dashboard screen from the security tab click the “Enable console access” button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eq3zpxuduqsfr6nml2zb.png)

After enabling console access you can also create a password for the user.

![AWS Console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbayq6y63qb6zsfp1i1r.png)

It’s common to enable programmatic access for users who need to work with AWS programmatically and AWS Management Console access for those who need to access the AWS Console.

## How to Create Groups with AWS IAM Service

Creating IAM (Identity and Access Management) groups in AWS is a way to manage and organize users with similar access needs. IAM groups allow you to assign permissions to multiple users at once, making it easier to maintain and enforce access policies across your AWS environment. 

1. Access the IAM Dashboard:
Once logged in, navigate to the IAM service by clicking on “Services” in the top-left corner, typing “IAM” in the search bar, and selecting “IAM” from the results.
2. Create a New IAM Group:
In the IAM dashboard, click on “Groups” in the left navigation pane.
Click the “Create group” button to start the group creation process.
3. Set Group Details:
Enter a name for the group, which should be a descriptive name that reflects the purpose or access requirements of the group. For example, you might create groups like “Developers,” “Administrators,” or “Accounting.”
Optionally, you can provide a group description for additional context.
4. Attach Policies to the Group:
You can attach IAM policies that define what actions are allowed or denied for the IAM group.

![AWS IAM Groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3savxfmf8plzr8p5hl8w.png)