How to allow an IAM entity to create the AWSServiceRoleForECS service-linked role?

0 votes
How do I allow an IAM entity to create the AWSServiceRoleForECS service-linked role?
Jun 23 in AWS by Meer
127 views

1 answer to this question.

0 votes

Hey @Meer,

Add the following statement to the permissions policy for the IAM entity that needs to create the service-linked role:

{
    "Effect": "Allow",
    "Action": [
        "iam:CreateServiceLinkedRole",
        "iam:PutRolePolicy"
    ],
    "Resource": "arn:aws:iam::*:role/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS*",
    "Condition": {"StringLike": {"iam:AWSServiceName": "ecs.amazonaws.com"}}
}
answered Jun 23 by Dhruv

Related Questions In AWS

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,090 points
284 views
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,090 points
178 views
0 votes
1 answer

Create an IAM service role for a Hybrid Environment

To create an IAM service role for ...READ MORE

answered Jan 10 in AWS by Nikita
40 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer