---
title: "PUT /target-policies/{policyName}"
method: PUT
path: "/target-policies/{policyName}"
---

# PUT /target-policies/{policyName}

`PUT /target-policies/{policyName}`

Attaches the specified policy to the specified principal (certificate or other credential).

Requires permission to access the [AttachPolicy](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `policyName` string, required

## Request body

- object
  - `target` string, required — The <a href="https://docs.aws.amazon.com/iot/latest/developerguide/security-iam.html">identity</a> to which the policy is attached. For example, a thing group or a certificate.

## Response `200`

Success

## Other responses

- `480` — ResourceNotFoundException
- `481` — InvalidRequestException
- `482` — ThrottlingException
- `483` — UnauthorizedException
- `484` — ServiceUnavailableException
- `485` — InternalFailureException
- `486` — LimitExceededException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
