Create an AWS roles object, which is associated with an AWS configuration object. 

NOTE: APIs for AWS roles apply only to instances of the that are hosted on AWS and configured for user mode of authentication.

NOTE: In most cases, you do not need to create awsRole objects. These objects are automatically created for you when you create an awsConfig object. For more information, see API Workflow - Manage AWS Configurations.


Required Permissions

At least one of the following roles is required to use this endpoint:

For more information, see API Authentication.


Request Type: POST



Request Body:

The following is an example request for such an AWS roles object. The IAM role arn is associated with the specific AWS configuration object:

  "role": "<my_iam_role_arn>"

Request Body with assignment:

When you create an AWS role object, you can optionally pass in a person or workspace identifier. Based on this identifier, the  attempts to assign the new object to the appropriate person or workspace identifiers through the referenced AWS configuration object.

Person Id:

  "role": "<my_iam_role_arn>",
  "personId": 99

Workspace Id:

  "role": "<my_iam_role_arn>",
  "workspaceId": 1


Response Status Code - Success:  201 - Created

Response Body:

    "createdFrom": "api",
    "id": 1,
    "role": "<my_iam_role_arn>",
    "awsConfigId": 2,
    "updatedAt": "2019-07-15T23:18:59.360Z",
    "createdAt": "2019-07-15T23:18:59.360Z",
    "deleted_at": null


For more information, see API AWSRoles Get List v4.