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,170 points
58 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,160 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,150 points
851 views
+1 vote
2 answers
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 22, 2020 in AWS by MD
• 95,160 points
124 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,160 points
57 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 10, 2020 in AWS by MD
• 95,160 points
227 views