☰

What Is AWS IAM? How It Works, Users, Policies & Keys

AWS Identity and Access Management (IAM)

The Amazon Web Services Identity and Access Management (IAM) service allows you to control access to your AWS account and define what users and/or applications can do. This tutorial will explain AWS IAM along with the steps to create an IAM user, how policies can be used to define permissions and how to generate an access key.

⚡ QUICK ANSWER

AWS Identity and Access Management is a free part of Amazon Web Services. It allows you to determine who can access your AWS account and what they can do. AWS IAM authenticates a user or application and then checks the AWS IAM policy which defines their permissions. Users, groups and roles can be created. Access keys can also be generated to provide programmatic access.

Within this Tutorial, we will show you how to utilise AWS Identity and Access Management. Are you seeking the ideal platform to gain knowledge regarding AWS Identity and Access Management? Or perhaps you are eagerly anticipating undertaking the highly regarded Advanced Certification Course at India’s Leading AWS Training institute? If so, well done – you are on the Right Path!

By following the below Tutorial, you will gain valuable knowledge relating to AWS Identity and Access Management. Simply follow all of the tutorials available from India’s Leading Best AWS Training institute and become a Pro AWS Developer.

In this article, you will learn:

  • What Is AWS IAM and How Does It Work?
  • How to Create an IAM User in AWS Step by Step
  • How to Create Access Key in AWS IAM

What Is AWS IAM and How Does It Work?

Amazon’s AWS Identity and Access Management is one of the Amazon Web Services. It can be used to securely manage who is able to access AWS services and resources. You can define which individuals and/or applications can authenticate (sign in) and be authorised (have permissions) to utilise AWS services.

AWS Identity and Access Management is a Security, Identity, & Compliance Amazon product. It allows you to securely manage access to AWS services and resources. Users and groups can be created and permission provided (or withheld) to these for accessing AWS services by attaching policies.

How Does AWS IAM Work?

How does AWS Identity and Access Management work? Authentication and then authorisation are undertaken for all AWS requests. Firstly, authentication identifies the requesting user or application. Secondly, the attached policy is analysed so that AWS can determine if permission should be granted to execute a requested action.

What Is an AWS IAM User and an AWS IAM Policy?

IAM users are individual or application identities that you create. These users possess log in details and can also have access keys. AWS IAM policies are permission definitions which are in the form of a JSON document. They identify which AWS services and actions can, and cannot, be accessed by a user, group or role. For example, an AWS Lambda function uses an IAM role, known as an execution role, to get permission to access other AWS services. Policies are attached to either users or groups. Consequently, the user is added to a group in the steps below which has been assigned the AdministratorAccess policy.

How to Create an IAM User in AWS Step by Step

Using your Amazon root account login details, undertake the below steps to generate IAM user credentials:

Step 1: Create an AWS Account

All AWS services can be accessed via an AWS account. This is essentially an Amazon.com account and can be used to access AWS products such as computing, storage and databases etc.

To reduce risk, it is good practice to generate IAM users for each individual that is to have administration rights to Amazon resources. This should be done rather than utilising an AWS accounts’ root user for accessing Amazon resources.

Step 2: Create an IAM User

Undertake the steps below to generate an IAM user for yourself and to add this to an administrators group (via the console):

Log in to the IAM console ( https://console.aws.amazon.com/iam/) using your AWS account email and password. This will log you in as the root user of your AWS account.

Important Note: It is good practice to follow this method and log in as the Administrator IAM user. Then securely store your root user login details. Only log in as your AWS account root user for a limited number of times to undertake essential account and service administration.

Within the left hand navigation panel, click on Users. Then click on Add user.

Configure IAM User Login Credentials

  1. Within the User name field, input ‘Administrator’.

Tick the box for AWS Management Console. Next, click on the radio button for Custom password and then type in your new password.

[Note: By default, on initial login to an account, AWS will require the new user to generate a new password. However, if required, this tick box can be deselected so that the new user is permitted to change their password upon login.]

Click on Next: Permissions.

Create an Administrators Group and Assign Permissions

Within the Set permissions section, click on the Add a user to a group option.

Click on Create group.

Within the Create group window:

  1. a) In the Group name field, input ‘Administrators’.
  2. b) Click on Filter policies. Then from the drop down menu, click on AWS managed -job function. This filters the displayed policy list to those which correspond to a particular job function type.
  3. c) Tick the AdministratorAccess policy which must be applied. Finally, click on the Create group button.

Note: In order to utilise the IAM administrator access permissions to access the AWS Billing and Cost Management console, you must first activate IAM user and role access to Billing.

Review and Create the IAM User

Returning to the groups list, tick the box for your new group. Should the group not appear, click on Refresh.

Click on Next: Tags.

  1. Optionally, add tags to a user. Tags are key-value data items and can be used to gather details about a user for example, their email and job title. Tags can also be used to monitor or manage a user’s access.

Click on Next: Review. Here you will see a summary of the groups which will be added to the new user. Having verified the information, click on Create user to confirm.

This process can be used to generate further groups and users. Access to your AWS account resources can then be allocated. Consequently, you are able to monitor or manage the role of individuals within your groups.

How to Create Access Key in AWS IAM

Step 3: To Get Your Access Key ID and Secret Access Key Follow The Steps Given Below

To interact with Amazon Services using either the API or AWS Command Line Interface, you will require an Access Key ID and Secret Access Key.

Note: Like AWS Identity and Access Management, each IAM user has a unique Access Key ID and Secret Access Key. These are used to digitally sign API programmatic interactions with AWS. Ensure that you do not conflate these credentials with those for other AWS services e.g. Amazon EC2 key pairs. These latter were used to connect to an EC2 instance using the PuTTY software.

♦ Access keys include both an Access Key ID and Secret Access Key. These are used to digitally sign requests that are made via APIs to AWS.

♦ Again, good practice dictates that you should not use your AWS account root user details, other than where absolutely necessary. Rather, generate an IAM user with access keys for yourself so that you can utilize Amazon services.

► To create access keys for an IAM user

Generate an IAM Access Key

Log into the AWS Management Console. Then open the IAM console ( https://console.aws.amazon.com/iam/ ).

  1. Within the navigation panel, click on Users.

Click on the name of the desired user. Then click on Security credentials.

Within the Access keys section, click on Create access key.

Download and Secure Your Access Keys

Click on Show to see the newly generated access key. Note that once this dialog box is closed, you will no longer be able to see the Secret Access Key. Therefore, prior to closing the dialog box, download the .csv file.

Your credentials will resemble the following:

♦ Access key ID: AKIAIUSFODMN7EXAMPLE

♦ Secret Access Key: wJalrXUtnFEMI/K7MIENG/bPxRfiCYEXAMPLEKZY

Important Note: Ensure that your access keys are securely stored. Never distribute them. Again, for security reasons, do not share them with external parties even if the request for them arises from AWS or Amazon.com. Amazon will never request your Secret Access Key.

Having downloaded the .csvfile, click on Close. Upon generation of an access key, this key pair is automatically activated. Thus, you can immediately use it to access Amazon services.

Having completed this tutorial, I trust that you now understand how to create an AWS Identity and Access Management user. You can then effectively manage access to AWS resources using IAM credentials.

Provided that AWS IAM has been properly configured and that there is a defined AWS IAM user along with a well-defined policy, your account is considerably more secure than if it was utilised using root credentials.

And always seek assistance where required!

Conclusion

AWS IAM allows you to determine who can access your AWS resources, and to what extent. You have learnt how AWS IAM functions and also how to create an IAM user. Furthermore, you have seen how policies are used to specify permissions and how to generate and securely store access keys. Good practice includes both the secure storage of root credentials and providing individuals with just the right level of access for their role. As more teams continue to migrate to the cloud, good initial configuration of access permissions will remain one of the most valuable skills for an AWS professional.

Turn Your AWS IAM Skills Into a Cloud Security Career

Aspiring to, or already progressing within, a cloud career? Knowledge of how to manage access is often one of the first areas employers will assess. Undergoing training on this subject via an expert led, versatile learning platform effectively evidences your skillset to employers. Practical experience of managing IAM users, groups, policies and access keys is integral to this.To build this hands-on experience with expert guidance, explore Prwatech’s AWS online training course.

 

Frequently Asked Questions

 

  1. What is AWS IAM?
    AWS Identity and Access Management is the Amazon Web Services element which enables you to control access to your AWS account and resources. Users, groups and roles can be created. Permissions can then be defined by attaching policies. AWS IAM is free and should be the first area of an Account To be configured to secure it.
  1. How does AWS IAM work?
    Authentication of who is making requests is initially carried out. Then, the relevant policies attached to a user, group or role are examined to establish whether a requested action should be permitted. If there is no explicit permission, then this will not be allowed.
  1. What is an AWS IAM user?
    An IAM user is an individual or application identity that you can generate within your AWS account. Each user has a name and login details. Access keys can also be generated for a user. Users are authorised by being attached to policies, typically by being added to groups. This ensures that people only have the correct level of access for their role.
  1. What is an AWS IAM policy?
    AWS IAM policies are JSON documents which identify permitted and prohibited actions for specific AWS resources. They can be attached to users, groups and/or roles. AWS also provides pre-generated managed policies for example, the AdministratorAccess policy. Further, bespoke policies can be formulated where greater control over a particular AWS service is required.
  1. How to create an IAM user in AWS step by step?
    Login to the IAM console. Click on Users and then Add users. Define a username. Tick the box for console access and define a password. Add the user to a group (for example, Administrators) which has been assigned the AdministratorAccess policy. Optionally, add tags to the user. Review the information and then click on Create user. Full details can be seen above.
  1. How to create an access key in AWS IAM?
    Access the IAM console. Click on Users and then select a user. Within the Security credentials tab, locate the Access keys section. Click on Create access key. Prior to closing the dialog box, download the .csv file as the Secret Access Key cannot subsequently be viewed.
  1. Why should I not use the AWS root user for daily work?
    The root user has overall control of an account and cannot have its permissions limited by IAM policies. Thus, in the event that root user credentials are compromised, the entire account is vulnerable. Instead, generate an IAM user with appropriate permissions and securely store your root user login details. Only utilise root user credentials for a limited number of tasks.
  1. What is the difference between an IAM user, group and role?
    Users are individual or application identities. Groups are sets of users who all share common policies. This facilitates easier management of permissions. Roles also contain permissions. However, unlike users, roles do not have a continuous password or access keys. They are transiently assumed by users, applications and/or AWS services.
  1. How should I keep AWS IAM access keys safe?
    Access keys must never be distributed. Also, they should not be emailed or uploaded to public code repositories. After downloading, store them in a secure place. Regularly update access keys and remove those that are no longer required. Remember that AWS will never request your Secret Access Key. Therefore, any such request should arouse suspicion.

Popular Tags:

AWS Identity and Access Management (IAM) IAM for Beginners - A Comprehensive Guide Mastering AWS IAM Policies