How to Create and Attach IAM Roles in AWS
Step-by-Step Guide to Creating and Attaching 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.