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:
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.
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.
Using your Amazon root account login details, undertake the below steps to generate IAM user credentials:
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.
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
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:
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.
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.
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/ ).
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!
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.
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.