Creating IAM Users, Adding MFA and Policies on AWS

IAM Users

In this guide, we are going to discuss “Creating IAM Users: Adding MFA and Policies on AWS”. Let’s put you through what the IAM concept is before you start creating groups and users via the AWS management console. Please see Microsoft Azure Multi-Factor Authentication (MFA), What you need to know before integrating on-premise AD with Azure Active Directory and MFA, and how to Setup HTTPS users using Git credentials and Pushing Code to AWS CodeCommit.

What is IAM?

IAM means Identity and Access Management which is used to control who is allowed to sign in or authenticate and also who is authorized or permitted to use or access a resource.

The AWS Identity and Access Management (IAM) is a web service that can assist you with access to AWS services and resources. When you sign up for an AWS account, you are first assigned with a single login that has access to all AWS services in the account. This login identity is called the Root user account which you can access just by signing with your email credentials.

But it is strongly advised that you do not use the root user login details for your everyday tasks which include admin tasks but follow the best practice of using this initial root user account to create your first IAM user.

Use the root user to perform few service management tasks and make sure you securely lock the account away. You might also want to read how to manage cost with AWS Budgets and if you are planning to deploy your application to AWS you can go through this guide on How to Deploy an Angular App to AWS S3

Multi-Factor Authentication
AWS Login Page

Also, see Rolling out Multi-factor Authentication – Recommendations, and how to create Profiles for your AWS Access Credentials for AWS Toolkit in Visual Studio.

IAM features

  • Shared access to your AWS account
  • Granular permissions
  • Secure access to AWS resources for EC2 applications
  • Multi-factor authentication (MFA)
  • Identity federation
  • Identity information for assurance
  • PCI DSS Compliance
  • Free to use

Tools to Access IAM

  • AWS Management Console
  • AWS Command Line Tools
  • AWS SDKs

IAM users

Furthermore, When you create an IAM user which consists of a name and credentials. However, this user represents the person or application that uses the account to interact with AWS.

Moreover, It is very possible to create one or more IAM users in the same AWS account. When a new staff joins your organization or when personnel joins your unit there might be a need for an IAM account to be created for such ones or when there is a need for a new application that needs to make API calls to some AWS Services.

In addition, Please note that an IAM user with administrator rights or permission is different from an AWS account root user.

Different ways to create IAM user

  • Creating IAM users via Console
  • Creating IAM users via AWS CLI
  • Creating IAM users via AWS API

Creating IAM users via Console

Using the AWS Management Console to create IAM users. Sign in to the IAM console via AWS Management Console

  • In the left Menu, select Users and then choose Add users.
AWS Policies
The Add users page

Enter the user name for the new user which will be used as the sign-in name for AWS. Nonetheless, You can add more than one user by clicking Add another user for every additional user. It is very possible to add up to 10 users at one time. Go ahead and pick the type of access this set of users will have. You can either select programmatic access or AWS Management Console or both.

  • Programmatic access: Consequently, You select this when the users require access to the API, AWS CLI or Windows PowerShell. With this, you get an access key for new users.
  • AWS Management Console access: this provides access to the AWS Management Console.
Identity and Access Management
Add User Configuration
  • On the Console password select one of the following:
  • Autogenerated password: Similarly, The system randomly generates a password that meets the account password policy.
  • Custom password: you personally assign a custom password.

Nevertheless, You can force a user to change their password on the first time sign in by selecting Require password reset.

User configuration

Click Next: Permissions. On the next page Set permissions this is where you will specify how you want to assign permissions to new users. Below are three options for you to select from:

Add user to the group. Therefore, If you plan to assign the users you created to one or more groups with assigned permissions policies, then this option is the best option. If the group is not yet created then you can Create a group.

Adding users to group

2. Copy permissions from existing user. Additionally, You can select this option if you plan to copy permissions from an existing user. Furthermore, IAM has the ability to display the list of users in your account and from the list you can choose the one the permissions matches the new users.

Copying Permissions from existing user

3. Attach existing policies directly. However, With this option, you will see a list of AWS managed and customer-managed policies in your account. From this list, you can choose the policies that match the one you want to attach to the new users created. Moreover, or you can decide to create a new policy by clicking on Create policy, and after creating it, you can attach it to the user.

Attaching existing policies directly

In addition, In the Set permissions boundary section, you can decide to select Create user without a permissions boundary or Use a permissions boundary to control the maximum user permissions.

Setting permissions boundary
Setting permissions boundary

Click Next: Tags. Nonetheless, The next section is optional; you can add tags to your user. These tags can be in the form of user information, email addresses and many more.

Adding Tags

Consequently, Click Next: Review to display all the choices you have selected and configured and after the review, you can proceed by clicking Create users.

Added User review

The next page is a success page confirming and displaying all the users created. Similarly, You will need to click on the Download .csv which consists of the sign-in details, make sure you save the file and share it with the users or you can click on the Send email to send the login details to the user.

Added User successful

Nevertheless, The below image is a description of the downloaded csv file that contains the sign in details

Downloaded CSV File

What is MFA?

Therefore, Multi-factor authority helps provide additional security to your AWS account. Additionally, it requires users to supply further unique authentication in addition to the regular sign-in credentials to an AWS account.

Furthermore, On the User summary page click on the tab Security credentials. In the Assigned MFA device section click on Manage.

MFA Configuration

However, Please note that we will only be setting up a Virtual MFA device in this guide.

Moreover, We will be using Google Authenticator app for this setup.

Managing your MFA device

In addition, Next click on the Show QR code to display the QR code so that you can scan with an authenticator. Nonetheless, you will be using but in this case we are using Google Authenticator.

Setting up of virtual MFA device

Consequently, Enter the MFA codes that display temporarily on your device as MFA code 1 and MFA code 2.

Adding your two MFA code

Similarly, After clicking on the Assign MFA button you will get a successful message. Nevertheless, and you can start using the virtual MFA to sign in to the user account created on AWS.

IAM Users account successfully created and assigned to virtual MFA

I hope you found this blog post on how to “Creating IAM Users: Adding MFA and Policies on AWS’ helpful. In case you have any questions do not hesitate to ask in the comment section.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x