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

0 votes
How to allow an IAM entity to delete the AWSServiceRoleForECS service-linked role?
Jun 23 in AWS by Vimal
48 views

1 answer to this question.

0 votes

Hi @Vimal,

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

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

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
283 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
176 views
0 votes
1 answer

How do I review recent activity for the service-linked role?

Hey @Kyago, follow these steps: Open the IAM ...READ MORE

answered Jun 23 in AWS by Ishaan
29 views
0 votes
1 answer
0 votes
1 answer