AWS::S3Vectors::Index - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.

AWS::S3Vectors::Index

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 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 Amazon 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.

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

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::S3Vectors::Index", "Properties" : { "DataType" : String, "Dimension" : Integer, "DistanceMetric" : String, "IndexName" : String, "MetadataConfiguration" : MetadataConfiguration, "VectorBucketArn" : String, "VectorBucketName" : String } }

YAML

Type: AWS::S3Vectors::Index Properties: DataType: String Dimension: Integer DistanceMetric: String IndexName: String MetadataConfiguration: MetadataConfiguration VectorBucketArn: String VectorBucketName: String

Properties

DataType

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.

Required: Yes

Type: String

Allowed values: float32

Update requires: Replacement

Dimension

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.

Required: Yes

Type: Integer

Minimum: 1

Maximum: 4096

Update requires: Replacement

DistanceMetric

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.

Required: Yes

Type: String

Allowed values: cosine | euclidean

Update requires: Replacement

IndexName

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, Amazon CloudFormation generates a unique ID and uses that ID for the index name.

Important

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.

Required: No

Type: String

Minimum: 3

Maximum: 63

Update requires: Replacement

MetadataConfiguration

The metadata configuration for the vector index.

Required: No

Type: MetadataConfiguration

Update requires: Replacement

VectorBucketArn

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

Required: No

Type: String

Update requires: Replacement

VectorBucketName

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

Required: No

Type: String

Minimum: 3

Maximum: 63

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the index ARN.

Example: arn:aws:s3vectors:us-east-1:123456789012:bucket/amzn-s3-demo-vector-bucket/index/my-index

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

CreationTime

Returns the date and time when the vector index was created.

Example: 2024-12-21T10:30:00Z

IndexArn

Returns the Amazon Resource Name (ARN) of the specified index.

Example: arn:aws:s3vectors:us-east-1:123456789012:bucket/amzn-s3-demo-vector-bucket/index/my-index