How to add IAM role to an existing instance in aws

0 votes

I would like to add an IAM Role to an existing EC2 instance in AWS. I tried using AWS CLI, however I could not find a way to do that.

Sep 6, 2018 in AWS by datageek
• 2,540 points
1,647 views

1 answer to this question.

0 votes

As of AWS CLI v1.11.46,  you can now attach an IAM role to an existing EC2 instance that was originally launched without an IAM role using the associate-iam-instance-profile command.

You can also replace the currently attached IAM role for a running instance using replace-iam-instance-profile-association.

answered Sep 6, 2018 by Archana
• 4,170 points

Related Questions In AWS

0 votes
1 answer

How to add a role to an instance profile in AWS?

Hi@akhtar, You can add the specified IAM role ...READ MORE

answered Nov 3, 2020 in AWS by MD
• 95,460 points
619 views
0 votes
1 answer

How to add AWS tags to an existing repository in AWS CodeCommit?

Hi@akhtar, You can add or update tags for a resource ...READ MORE

answered Nov 25, 2020 in AWS by MD
• 95,460 points
741 views
+1 vote
2 answers

How to create an EC2 instance in AWS Console?

Here is a step by step guide ...READ MORE

answered Feb 11, 2019 in AWS by Shubendu
2,235 views
+1 vote
1 answer

How to create an IAM user in AWS?

Hi@akhtar, To create new user in AWS, you ...READ MORE

answered Jun 1, 2020 in AWS by MD
• 95,460 points
1,417 views
0 votes
1 answer

How to create an AWS EC2 Instance in the VPC with Boto3 module?

Hi@akhtar, You can use a network interface in ...READ MORE

answered Oct 11, 2020 in AWS by MD
• 95,460 points
2,534 views
0 votes
1 answer

How to create an access key for an IAM user in AWS?

Hi@akhtar, You can create a new AWS secret ...READ MORE

answered Nov 3, 2020 in AWS by MD
• 95,460 points
670 views
0 votes
1 answer

How to attach a volume to an instance in AWS?

Hi@akhtar, You can attach an EBS volume to a ...READ MORE

answered Nov 5, 2020 in AWS by MD
• 95,460 points
541 views
0 votes
1 answer

How to attach an instance to an Auto Scaling group in AWS?

Hi@akhtar, You can attach one or more EC2 instances ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,460 points
1,907 views
0 votes
1 answer

How to launch an EC2 instance with IAM-Role?

The credentials you are using from your ...READ MORE

answered Sep 3, 2018 in AWS by Archana
• 4,170 points
3,002 views
0 votes
1 answer

How to Restrict AWS Resource Access to a Specific IAM Role

You can use iam get-role to find the Role-Id and add ...READ MORE

answered Aug 13, 2018 in AWS by Archana
• 4,170 points
1,180 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP