Skip to main content

indexes

Creates, updates, deletes, gets or lists an indexes resource.

Overview

Nameindexes
TypeResource
Idaws.s3vectors.indexes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)Date and time when the vector index was created.
data_typestringThe data type of the vectors inserted into the vector index. (float32)
dimensionintegerThe number of values in the vectors that are inserted into the vector index.
distance_metricstringThe distance metric to be used for similarity search. (euclidean, cosine)
encryption_configurationobjectThe encryption configuration for a vector bucket or index. By default, if you don't specify, all new vectors in Amazon S3 vector buckets use server-side encryption with Amazon S3 managed keys (SSE-S3), specifically AES256. You can optionally override bucket level encryption settings, and set a specific encryption configuration for a vector index at the time of index creation.
index_arnstringThe Amazon Resource Name (ARN) of the vector index. (pattern: <code>arn:aws[-a-z0-9]*:s3vectors:[a-z0-9-]+:[0-9]{12}:bucket/[a-z0-9][a-z0-9-.]{1,61}[a-z0-9]/index/[a-z0-9][a-z0-9-.]{1,61}[a-z0-9]</code>)
index_namestringThe name of the vector index.
metadata_configurationobjectThe metadata configuration for a vector index.
vector_bucket_namestringThe name of the vector bucket that contains the vector index.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_indexselectregionReturns vector index attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN). Permissions You must have the s3vectors:GetIndex permission to use this operation.
list_indexesselectregionReturns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN). Permissions You must have the s3vectors:ListIndexes permission to use this operation.
create_indexinsertregion, indexName, dataType, dimension, distanceMetricCreates 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. You must have the s3vectors:TagResource permission in addition to s3vectors:CreateIndex permission to create a vector index with tags.
delete_indexdeleteregionDeletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN). Permissions You must have the s3vectors:DeleteIndex permission to use this operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns vector index attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN). Permissions You must have the s3vectors:GetIndex permission to use this operation.

SELECT
creation_time,
data_type,
dimension,
distance_metric,
encryption_configuration,
index_arn,
index_name,
metadata_configuration,
vector_bucket_name
FROM aws.s3vectors.indexes
WHERE region = '{{ region }}' -- required
;

INSERT examples

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. You must have the s3vectors:TagResource permission in addition to s3vectors:CreateIndex permission to create a vector index with tags.

INSERT INTO aws.s3vectors.indexes (
vectorBucketName,
vectorBucketArn,
indexName,
dataType,
dimension,
distanceMetric,
metadataConfiguration,
encryptionConfiguration,
tags,
region
)
SELECT
'{{ vectorBucketName }}',
'{{ vectorBucketArn }}',
'{{ indexName }}' /* required */,
'{{ dataType }}' /* required */,
{{ dimension }} /* required */,
'{{ distanceMetric }}' /* required */,
'{{ metadataConfiguration }}',
'{{ encryptionConfiguration }}',
'{{ tags }}',
'{{ region }}'
RETURNING
index_arn
;

DELETE examples

Deletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN). Permissions You must have the s3vectors:DeleteIndex permission to use this operation.

DELETE FROM aws.s3vectors.indexes
WHERE region = '{{ region }}' --required
;