---
title: "POST /role-aliases/{roleAlias}"
method: POST
path: "/role-aliases/{roleAlias}"
---

# POST /role-aliases/{roleAlias}

`POST /role-aliases/{roleAlias}`

Creates a role alias.

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

## Path parameters

- `roleAlias` string, required

## Request body

- object
  - `roleArn` string, required — The role ARN.
  - `credentialDurationSeconds` integer — <p>How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.</p> <p>This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.</p>
  - `tags` Tag[] — <p>Metadata which can be used to manage the role alias.</p> <note> <p>For URI Request parameters use format: ...key1=value1&amp;key2=value2...</p> <p>For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..."</p> <p>For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."</p> </note>
    - `Key` string, required — The tag's key.
    - `Value` string — The tag's value.

## Response `200`

Success

- CreateRoleAliasResponse
  - `roleAlias` string — The role alias.
  - `roleAliasArn` string — The role alias ARN.

## Other responses

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

---

[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)
