How to add a role to an instance profile in AWS

0 votes

Hi Team,

I have created one instance profile in AWS. I want to add a role to that instance profile. How can I do that?

Nov 3, 2020 in AWS by akhtar
• 38,260 points
623 views

1 answer to this question.

0 votes

Hi@akhtar,
You can add the specified IAM role to the specified instance profile. An instance profile in AWS can contain only one role. The following add-role-to-instance-profile command adds the role named S3Access to the instance profile named Webserver.

$ aws iam add-role-to-instance-profile --role-name S3Access --instance-profile-name Webserver
answered Nov 3, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer

How to add IAM role to an existing instance in aws?

As of AWS CLI v1.11.46,  you can ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
1,652 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,237 views
0 votes
1 answer

How to create a branch in an AWS CodeCommit repository?

Hi@akhtar, This example creates a branch in an ...READ MORE

answered Nov 23, 2020 in AWS by MD
• 95,460 points
1,457 views
0 votes
1 answer
0 votes
1 answer
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
545 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,539 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