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, 2019 in AWS by Vimal
1,315 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, 2019 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,170 points
2,978 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,170 points
1,629 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, 2019 in AWS by Ishaan
554 views
0 votes
1 answer

How to delete an access key for an IAM user?

Hi@akhtar, If you do not specify a user ...READ MORE

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