AWS::S3Vectors::IndexThe `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 { CfnIndex } from 'aws-cdk-lib/aws-s3vectors';Or use the module namespace:
import * as s3vectors from 'aws-cdk-lib/aws-s3vectors';
// s3vectors.CfnIndexConfiguration passed to the constructor as CfnIndexProps.
dataTypeRequiredstringThe data type of the vectors to be inserted into the vector index. Currently, only `float32` is supported, which represents 32-bit floating-point numbers.
dimensionRequirednumberThe 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.
distanceMetricRequiredstringThe 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.
encryptionConfigurationOptionalIResolvable | EncryptionConfigurationPropertyThe 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.
indexNameOptionalstringThe 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.
metadataConfigurationOptionalIResolvable | MetadataConfigurationPropertyThe metadata configuration for the vector index.
tagsOptionalCfnTag[]User tags (key-value pairs) to associate with the index.
vectorBucketArnOptionalstringThe Amazon Resource Name (ARN) of the vector bucket that contains the vector index.
vectorBucketNameOptionalstringThe name of the vector bucket that contains the vector index.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-s3vectorsAWS::S3Vectors::Index