How to Create and Attach IAM Roles in AWS
Table of contents
Introduction
An IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.
For more details visit.
Creating IAM Roles
Open the AWS Management Console and navigate to the Identity and Access Management (IAM).
Click on Roles from the left navigation panel.
Click Create role.
Select AWS Service.
Select EC2 in the Use case.
Click Next.
Search AmazonS3FullAccess in Permissions policies, and select it.
Write a suitable role name.
-
Click Next -> Create Role.
Open the role by clicking on its name.
Select Permissions, under Permissions policies you can check the policy names.
Attaching role to a service
Create an EC2 instance.
Select the instance.
Go to Actions -> Security -> Modify IAM role.
Select the IAM role from the from down.
Click Update IAM role.
Subscribe to my newsletter
Read articles from Arish Ahmad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Arish Ahmad
Arish Ahmad
Final-year BTech student specializing in software development. Completed a Flutter internship and amassed three years of project experience, crafting Threads clone, Stream Arbiter, Ticketify, and Google Docs. Proficient in C++, having successfully solved 250+ LeetCode questions.