Skip to content

Policy to allow user to Tag Account in specific OUs

0

Hi

I would like to create an IAM Policy to allow a user to put tags on Account taht belongs to a specific OU

I tried with this kind of policy without sucess.

{
			"Action": [
				"organizations:UntagResource",
				"organizations:TagResource"
			],
			"Condition": {
				"ForAnyValue:StringLike": {
					"aws:ResourceOrgPaths": [
						"o-xxxxx/r-eihy/ou-eihy-xihtvxxx/ou-eihy-3ku70xxx/*",
						"o-xxxxx/r-eihy/ou-eihy-xihtvxxx/ou-eihy-3ku7xxx/",
						"o-xxxxx/r-eihy/ou-eihy-xihtvxxxx/ou-eihy-3ku70xxx",
						"*ou-eihy-3ku70yzx*"
					]
				}
			},
			"Effect": "Allow",
			"Resource": "*"
		}

Do you have any clue to achieve this goal

Regards

asked 2 years ago493 views

1 Answer
0

I apologize, but I don't have specific information about creating an IAM policy to allow a user to put tags on accounts that belong to specific Organizational Units (OUs) in AWS Organizations. The policy you've provided seems to be attempting to use the Organizations service, but the available sources don't cover this specific use case.

However, I can provide some general guidance on using tags in IAM policies:

  1. IAM policies can use tags to control access to AWS resources, including IAM users and roles.

  2. You can use condition elements in IAM policies to specify conditions based on tags. These conditions can be used to control what actions can be performed based on the tags attached to the resource or the principal making the request.

  3. There are several tag-related condition keys that can be used in IAM policies, such as aws:ResourceTag, aws:RequestTag, and aws:PrincipalTag.

  4. When creating policies to manage tags, you can specify which tag keys and values are allowed to be added or modified.

To achieve your specific goal of allowing a user to tag accounts in specific OUs, you might need to combine IAM policies with Organizations policies. However, without more detailed information about the Organizations service and its integration with IAM for this specific use case, I can't provide a definitive solution.

I recommend consulting the AWS documentation specifically for Organizations and its tagging capabilities, or reaching out to AWS support for guidance on how to properly construct a policy for your particular needs.
Sources
Controlling access to and for IAM users and roles using tags - AWS Identity and Access Management
Using tags in IAM permission policies - Tagging AWS Resources and Tag Editor

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.