IAM_Tutorial
IAM_Tutorial
Introduction:
AWS IAM is generally defined as Identity and Access Management, which is
derived as one of the best web services that help to provide secured control
access to all the AWS resources.
You can use this IAM option in order to control both authorized and
unauthorized resources easily.
If you want to create this identity and access management, you need to create
the AWS account first.
It is better to start with a single sign-in identity, which can complete all the
possible access that needs to avail the AWS resources and services in the
respective account.
This particular identity can be named as the AWS account root user that can
be easy to log in with the prospective users for all the tasks whether it is admin
ones or some other ones.
Instead, to combine all the best practices, it is better to create a new identity
as the first IAM user.
Then it can automatically secure the look away from the root user login
credentials, which are used to perform all the management-related tasks.
IAM Identities Classified
1. IAM Users
2. IAM Groups
3. IAM Roles
Root user
The root user will automatically be created and granted unrestricted
rights. We can create an admin user with fewer powers to control the
entire Amazon account.
IAM Users
We can utilize IAM users to access the AWS Console and their
administrative permissions differ from those of the Root user and if
we can keep track of their login information.
Example
With the aid of IAM users, we can accomplish our goal of giving a
specific person access to every service available in the Amazon
dashboard with only a limited set of permissions, such as read-only
access. Let’s say user-1 is a user that I want to have read-only access
to the EC2 instance and no additional permissions, such as create,
delete, or update. By creating an IAM user and attaching user-1 to
that IAM user, we may allow the user access to the EC2 instance with
the required permissions.
IAM Groups
A group is a collection of users, and a single person can be a member
of several groups. With the aid of groups, we can manage
permissions for many users quickly and efficiently.
Example
Consider two users named user-1 and user-2. If we want to grant
user-1 specific permissions, such as the ability to delete, create, and
update the auto-calling group only, and if we want to grant user-2 all
the necessary permissions to maintain the auto-scaling group as well
as the ability to maintain EC2, we can create groups and add this user
to them. If a new user is added, we can add that user to the required
group with the necessary permissions.
IAM Roles
While policies cannot be directly given to any of the services
accessible through the Amazon dashboard, IAM roles are similar to
IAM users in that they may be assumed by anybody who requires
them. By using roles, we can provide AWS Services access rights to
other AWS Services.
Example
Consider Amazon EKS. In order to maintain an autoscaling group,
AWS EKS needs access to EC2 instances. Since we can’t attach policies
directly to the EKS in this situation, we must build a role and then
attach the necessary policies to that specific role and attach that
particular role to EKS.
IAM Policies
IAM Policies can manage access for AWS by attaching them to the
IAM Identities or resources IAM policies defines permissions of AWS
identities and AWS resources when a user or any resource makes a
request to AWS will validate these policies and confirms whether the
request to be allowed or to be denied. AWS policies are stored in the
form of Jason format the number of policies to be attached to
particular IAM identities depends upon no.of permissions required
for one IAM identity. IAM identity can have multiple policies attached
to them.
The IAM Features:
Step2: Sign in as Select the Users menu. Navigate to the Users screen. You'll
find it in the IAM dashboard, under the Identity and Access Management
(IAM) drop-down menu on the left side of the screen. Click on Users.
Step3: Add a user. Click on Add User to navigate to a user detail form. Provide
all details, such as the username and access type. In this tutorial, we use the
name cli-user, and check the Programmatic access box under Access type. This
option gives the user access to AWS development tools, such as the command
line interface used later in this tutorial.
Click on Next: Permissions to continue.
Step4: Set the user permissions.
Click Attach existing policies directly and then filter the policies by keyword:
IAM. For this user, select IAM Full Access from the list of available policies.
The IAM Full Access policy enables this user to create and manage user
permissions in AWS. Later in the tutorial, this user will perform AWS IAM
operations.
Step 5: Finish the user setup.
For this tutorial, we will skip the tags section of user creation and go to the
review page. Check the details of the username, AWS access type and
permissions. Then, click Create user
Multi-Factor Authentication:
Step6: Download the app from the store and scan the QR code to get the
Authentication codes and key the code after another.
Step 7: MFA is a configured successfully with your device.
Step 8: Refresh to the MFA status
Create Group and set up User in Group
Step 1: Create group on AWS EC2 console
Step 2: Add user to group