S3Vectors / Client / create_index

create_index

S3Vectors.Client.create_index(**kwargs)

Note

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Creates a vector index within a vector bucket. To specify the vector bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions

You must have the s3vectors:CreateIndex permission to use this operation.

See also: AWS API Documentation

Request Syntax

response = client.create_index(
    vectorBucketName='string',
    vectorBucketArn='string',
    indexName='string',
    dataType='float32',
    dimension=123,
    distanceMetric='euclidean'|'cosine',
    metadataConfiguration={
        'nonFilterableMetadataKeys': [
            'string',
        ]
    }
)
Parameters:
  • vectorBucketName (string) – The name of the vector bucket to create the vector index in.

  • vectorBucketArn (string) – The Amazon Resource Name (ARN) of the vector bucket to create the vector index in.

  • indexName (string) –

    [REQUIRED]

    The name of the vector index to create.

  • dataType (string) –

    [REQUIRED]

    The data type of the vectors to be inserted into the vector index.

  • dimension (integer) –

    [REQUIRED]

    The dimensions of the vectors to be inserted into the vector index.

  • distanceMetric (string) –

    [REQUIRED]

    The distance metric to be used for similarity search.

  • metadataConfiguration (dict) –

    The metadata configuration for the vector index.

    • nonFilterableMetadataKeys (list) – [REQUIRED]

      Non-filterable metadata keys allow you to enrich vectors with additional context during storage and retrieval. Unlike default metadata keys, these keys can’t be used as query filters. Non-filterable metadata keys can be retrieved but can’t be searched, queried, or filtered. You can access non-filterable metadata keys of your vectors after finding the vectors. For more information about non-filterable metadata keys, see Vectors and Limitations and restrictions in the Amazon S3 User Guide.

      • (string) –

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions