AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::S3Vectors::Index

CfnIndex

The `AWS::S3Vectors::Index` resource defines a vector index within an Amazon S3 vector bucket. For more information, see [Creating a vector index in a vector bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-create-index.html) in the *Amazon Simple Storage Service User Guide* . You must specify either `VectorBucketName` or `VectorBucketArn` to identify the bucket that contains the index. To control how AWS CloudFormation handles the vector index when the stack is deleted, you can set a deletion policy for your index. You can choose to *retain* the index or to *delete* the index. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) . - **Permissions** - The required permissions for CloudFormation to use are based on the operations that are performed on the stack. - Create - s3vectors:CreateIndex - s3vectors:GetIndex - Read - s3vectors:GetIndex - Delete - s3vectors:DeleteIndex - s3vectors:GetIndex - List - s3vectors:ListIndexes

Import

import { CfnIndex } from 'aws-cdk-lib/aws-s3vectors';

Or use the module namespace:

import * as s3vectors from 'aws-cdk-lib/aws-s3vectors';
// s3vectors.CfnIndex

Properties

Configuration passed to the constructor as CfnIndexProps.

dataTypeRequired
string

The data type of the vectors to be inserted into the vector index. Currently, only `float32` is supported, which represents 32-bit floating-point numbers.

dimensionRequired
number

The dimensions of the vectors to be inserted into the vector index. This value must be between 1 and 4096, inclusive. All vectors stored in the index must have the same number of dimensions. The dimension value affects the storage requirements and search performance. Higher dimensions require more storage space and may impact search latency.

distanceMetricRequired
string

The distance metric to be used for similarity search. Valid values are:. - `cosine` - Measures the cosine of the angle between two vectors. - `euclidean` - Measures the straight-line distance between two points in multi-dimensional space. Lower values indicate greater similarity.

encryptionConfigurationOptional
IResolvable | EncryptionConfigurationProperty

The encryption configuration for a vector index. By default, if you don't specify, all new vectors in the vector index will use the encryption configuration of the vector bucket.

indexNameOptional
string

The name of the vector index to create. The index name must be between 3 and 63 characters long and can contain only lowercase letters, numbers, hyphens (-), and dots (.). The index name must be unique within the vector bucket. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the index name. > If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.

metadataConfigurationOptional
IResolvable | MetadataConfigurationProperty

The metadata configuration for the vector index.

tagsOptional
CfnTag[]

User tags (key-value pairs) to associate with the index.

vectorBucketArnOptional
string

The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.

vectorBucketNameOptional
string

The name of the vector bucket that contains the vector index.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-s3vectors
CFN TypeAWS::S3Vectors::Index
Properties9

External Links