CreateIndex - Amazon Kendra


Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the Status field returned from a call to DescribeIndex. The Status field is set to ACTIVE when the index is ready to use.

Once the index is active you can index your documents using the BatchPutDocument operation or using one of the supported data sources.

Request Syntax

{ "ClientToken": "string", "Description": "string", "Edition": "string", "Name": "string", "RoleArn": "string", "ServerSideEncryptionConfiguration": { "KmsKeyId": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ], "UserContextPolicy": "string", "UserTokenConfigurations": [ { "JsonTokenTypeConfiguration": { "GroupAttributeField": "string", "UserNameAttributeField": "string" }, "JwtTokenTypeConfiguration": { "ClaimRegex": "string", "GroupAttributeField": "string", "Issuer": "string", "KeyLocation": "string", "SecretManagerArn": "string", "URL": "string", "UserNameAttributeField": "string" } } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex operation with the same client token will create only one index.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: No


A description for the index.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

Pattern: ^\P{C}*$

Required: No


The Amazon Kendra edition to use for the index. Choose DEVELOPER_EDITION for indexes intended for development, testing, or proof of concept. Use ENTERPRISE_EDITION for your production databases. Once you set the edition for an index, it can't be changed.

The Edition parameter is optional. If you don't supply a value, the default is ENTERPRISE_EDITION.

Type: String


Required: No


The name for the new index.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1000.

Pattern: [a-zA-Z0-9][a-zA-Z0-9_-]*

Required: Yes


An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1284.

Pattern: arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}

Required: Yes


The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.

Type: ServerSideEncryptionConfiguration object

Required: No


A list of key-value pairs that identify the index. You can use the tags to identify and organize your resources and to control access to resources.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No


The user context policy.


All indexed content is searchable and displayable for all users. If there is an access control list, it is ignored. You can filter on user and group attributes.


Enables SSO and token-based user access control. All documents with no access control and all documents accessible to the user will be searchable and displayable.

Type: String


Required: No


The user token configuration.

Type: Array of UserTokenConfiguration objects

Array Members: Maximum number of 1 item.

Required: No

Response Syntax

{ "Id": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The unique identifier of the index. Use this identifier when you query an index, set up a data source, or index a document.

Type: String

Length Constraints: Fixed length of 36.

Pattern: [a-zA-Z0-9][a-zA-Z0-9-]*


For information about the errors that are common to all actions, see Common Errors.


HTTP Status Code: 400


HTTP Status Code: 400


HTTP Status Code: 500


HTTP Status Code: 400


HTTP Status Code: 400


HTTP Status Code: 400


HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: