Step 1 – Open IAM : Open IAM
Step 2 – Open Roles : Click on Roles on Sidebar
Step 3 – Create Role : click on Create role
Step 4 – Start Creating role :
(i) Select trusted entity | Trusted entity type | AWS service |
Use case | EC2 | |
(ii) Add permissions | Permissions policies | AmazonS3ReadOnlyAccess |
(iii) Name, review, and create | Role name | <your-role-name> |
tags | <your-tags> |
(i) Select trusted entity :
(ii) Add permissions
(iii) Name, review, and create :
Once after clicking on Create role , it will shows you success info, you can click on view role for further information if you want to explore
Step 5 – Attaching Role to EC2 instance :
Select the instance > Actions > Security > Modify IAM role
Modify IAM role : Search for role and select it , Next click on Update IAM role
Role is applied to EC2 Instance.