Mastering IAM in AWS: Creating Users and Roles Step-by-Step


An IAM Role (Identity and Access Management Role) in AWS is a secure way to grant temporary access to AWS services and resources without needing to share long-term credentials (like IAM user access keys). In this tutorial we will look at how to create IAM roles and give it permissions so that the user or the service can have the privilege to access the resource.
Objectives
- To create IAM role
Requirements
- AWS Account
To Create IAM role
- Login to your aws account
Click on the Search bar and Type IAM
Click on IAM
- Click on users
- Click on Create user
Type the name of the user
Click on provde user access to aws management console
Click on I want to create an IAM user
Select wether you want aws to generate automatic password for you or you want to type the password
Click on next
Click on Attach policies direcly
Search for the permission you the search box
Select the permission
- Click on Create user
Click on Create user
You can see the user created
To add more permission to the user
- Click on the user
You can do 2 things here. Either you add an already existing permission or you create you custom permission and attach. In our case we will attach an already existing permission
- Click on Add permission
Just like we did before we will select the add policy to
Click on the permission
Click on next
- Review click on Add Permission
How to create IAM role
Click on role
Click on create role
- Select your use case in our tutorial we will use ec2
- Click on next
Type the name of the permission
Check the permission you want to attach to the role
- Type the role name
- Click on Create role
You can see the role we just created
Subscribe to my newsletter
Read articles from Oshaba Samson directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Oshaba Samson
Oshaba Samson
I am a software developer with 5 years + experience. I have working on web apps ecommerce, e-learning, hrm web applications and many others