Issue
At the moment I have 2 AWS IAM roles and each has 1 policy, call them Policy-A and Policy-B. I would like to attach both roles to an EC2 instance. Alternative is to create a new role which has both Policy-A and Policy-B.
Can I attach more than 1 IAM role to an EC2 instance?
Solution
You can attach only one role to ec2 instance. Refer this amazon document: IAM Roles for Amazon EC2. Instead:
- create 2 managed policies
- attach them to the same IAM Role.
- Attach that IAM Role to the EC2 instance.
This post is a comment by krishna_mee2004, but it should be an answer.
Answered By - bolov Answer Checked By - Willingham (WPSolving Volunteer)