organizations:AttachPolicy

Write

organizations:AttachPolicy is a Write access-level action in the organizations service. Grants permission to attach a policy to a root, an organizational unit, or an individual account

Resource types

ARNs that organizations:AttachPolicy can be scoped to in an IAM policy.

arn:${Partition}:organizations::${Account}:policy/o-${OrganizationId}/${PolicyType}/p-${PolicyId}
policy
arn:${Partition}:organizations::${Account}:account/o-${OrganizationId}/${AccountId}
account
arn:${Partition}:organizations::${Account}:ou/o-${OrganizationId}/ou-${OrganizationalUnitId}
organizationalunit
arn:${Partition}:organizations::${Account}:root/o-${OrganizationId}/r-${RootId}
root

Condition keys

Keys you can use in the Condition block of a policy that grants organizations:AttachPolicy.

aws:ResourceTag/${TagKey} String

Filters access by the tags associated with the resource

Example IAM policy

A minimal policy that allows organizations:AttachPolicy. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowOrganizationsAttachPolicy",
      "Effect": "Allow",
      "Action": "organizations:AttachPolicy",
      "Resource": "*"
    }
  ]
}

Related actions in organizations

View all organizations actions →