내용으로 건너뛰기

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.