跳至内容

User create services already tagged

0

Hello everyone,

We have a user from outside our organization who will do some things in the AWS console, such as Glue, Athena, and lambda. However, I want to know if there is a way for me to set the user, or in his policy, that all services he creates will be tagged by these tags that I set.

3 回答
0

Hi

  • Here is the below Example you can define a condition key that checks for the presence of specific tags on the resource being created
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "glue:*",
        "athena:*",
        "lambda:*"
      ],
      "Resource": [
        "arn:aws:glue:*:*:glue:table",  //  resource for Glue
        "arn:aws:athena:*:*:workgroup",  // resource for Athena
        "arn:aws:lambda:*:*:function"    // resource for Lambda
      ],
      "Condition": {
        "StringLike": {
          "aws:resourceTag/tagName1": "value1",
          "aws:resourceTag/tagName2": "value2"
        }
      }
    }
  ]
}

专家
已回答 2 年前
  • Thanks, i'll try that

  • To expand on that policy piece, if you were to provide that external user access to a IAM role in your AWS account with such a tag-based policy attached, then they would not be able to create/view or edit any resources that did not have those tags that you defined. Thus the user will be mandated to create resources with those specified tags, achieving your end goal :)

0

Hello Marcelo,

As far as I know, there are no native solutions that can automate the tagging based on user, but you can enforce tagging in your environment as described here.

With that said, AWS provides building blocks that you can use to tag the resources automatically as described here and here

Let me know if this helps.

Best regards, Mukul Dharwadkar

已回答 2 年前
AWS
专家
已审核 2 年前
  • Thanks! I'll check the links

0

There is another way to look at it. How about if you set a permission boundary or Service Control Policy(SCP), which restricts user to create resources if not appropriately tagged.

Refer following blog and re:Post Knowledge Center Article:

Comment here if you have additional questions. Happy to help.

Abhishek

AWS
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。