Delete tags via Tag Editor

0

I want to delete a tag from all my services via Tag Editor, but when I try to do this operation I get the following error: AccessDeniedException: User

I have permission to edit only tags for some services, but when I try to delete them through the Tag Editor, it doesn't let me delete even the ones I have permission to. Which IAM policy do I need to be able to manage tags via Tag Editor?

Thanks!

natte
已提問 9 個月前檢視次數 369 次
2 個答案
0
profile pictureAWS
專家
kentrad
已回答 9 個月前
0

If you only want to manage tags for specific services, you can get granular with your permissions. Here's a basic example for granting tag-editing permissions for EC2 and S3:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "TagEditorPermissions",
            "Effect": "Allow",
            "Action": [
                "ec2:CreateTags",
                "ec2:DeleteTags",
                "s3:PutBucketTagging",
                "s3:DeleteBucketTagging"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "tag:GetResources",
            "Resource": "*"
        }
    ]
}

This policy allows tag management for EC2 and S3. However, if you want to expand to other services, you'd have to include the appropriate tag management permissions for those as well.

If you want to do this across all services, here is an example:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ComprehensiveTaggingPermissions",
            "Effect": "Allow",
            "Action": [
                "tag:TagResources",
                "tag:UntagResources",
                "tag:GetResources",
                "tag:GetTagKeys",
                "tag:GetTagValues",
                "resource-explorer:List*"
            ],
            "Resource": "*"
        }
    ]
}

With this policy, you're allowing operations related to tagging, untagging, getting resources, tag keys, tag values, and any List* operation from the resource-explorer service, across all AWS services.

Note: A word of caution on using broad permissions; always ensure they are granted judiciously and reviewed regularly.

Hope this helps!

profile picture
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南