Amazon S3 Vectors 2025-07-15
- Client: Aws\S3Vectors\S3VectorsClient
- Service ID: s3vectors
- Version: 2025-07-15
This page describes the parameters and results for the operations of the Amazon S3 Vectors (2025-07-15), and shows how to use the Aws\S3Vectors\S3VectorsClient object to call the described operations. This documentation is specific to the 2025-07-15 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CreateIndex ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- CreateVectorBucket ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- DeleteIndex ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- DeleteVectorBucket ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- DeleteVectorBucketPolicy ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- DeleteVectors ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- GetIndex ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- GetVectorBucket ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- GetVectorBucketPolicy ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- GetVectors ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- ListIndexes ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- ListVectorBuckets ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- ListVectors ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- PutVectorBucketPolicy ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- PutVectors ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
- QueryVectors ( array $params = [] )
- Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
CreateIndex
$result = $client->createIndex
([/* ... */]); $promise = $client->createIndexAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->createIndex([ 'dataType' => 'float32', // REQUIRED 'dimension' => <integer>, // REQUIRED 'distanceMetric' => 'euclidean|cosine', // REQUIRED 'indexName' => '<string>', // REQUIRED 'metadataConfiguration' => [ 'nonFilterableMetadataKeys' => ['<string>', ...], // REQUIRED ], 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- dataType
-
- Required: Yes
- Type: string
The data type of the vectors to be inserted into the vector index.
- dimension
-
- Required: Yes
- Type: int
The dimensions of the vectors to be inserted into the vector index.
- distanceMetric
-
- Required: Yes
- Type: string
The distance metric to be used for similarity search.
- indexName
-
- Required: Yes
- Type: string
The name of the vector index to create.
- metadataConfiguration
-
- Type: MetadataConfiguration structure
The metadata configuration for the vector index.
- vectorBucketArn
-
- Type: string
The Amazon Resource Name (ARN) of the vector bucket to create the vector index in.
- vectorBucketName
-
- Type: string
The name of the vector bucket to create the vector index in.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- ConflictException:
The request failed because a vector bucket name or a vector index name already exists. Vector bucket names must be unique within your Amazon Web Services account for each Amazon Web Services Region. Vector index names must be unique within your vector bucket. Choose a different vector bucket name or vector index name, and try again.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
CreateVectorBucket
$result = $client->createVectorBucket
([/* ... */]); $promise = $client->createVectorBucketAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
- Permissions
-
You must have the
s3vectors:CreateVectorBucket
permission to use this operation.
Parameter Syntax
$result = $client->createVectorBucket([ 'encryptionConfiguration' => [ 'kmsKeyArn' => '<string>', 'sseType' => 'AES256|aws:kms', ], 'vectorBucketName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- encryptionConfiguration
-
- Type: EncryptionConfiguration structure
The encryption configuration for the vector bucket. 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
. - vectorBucketName
-
- Required: Yes
- Type: string
The name of the vector bucket to create.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- ConflictException:
The request failed because a vector bucket name or a vector index name already exists. Vector bucket names must be unique within your Amazon Web Services account for each Amazon Web Services Region. Vector index names must be unique within your vector bucket. Choose a different vector bucket name or vector index name, and try again.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
DeleteIndex
$result = $client->deleteIndex
([/* ... */]); $promise = $client->deleteIndexAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
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.
Parameter Syntax
$result = $client->deleteIndex([ 'indexArn' => '<string>', 'indexName' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- indexArn
-
- Type: string
The ARN of the vector index to delete.
- indexName
-
- Type: string
The name of the vector index to delete.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
DeleteVectorBucket
$result = $client->deleteVectorBucket
([/* ... */]); $promise = $client->deleteVectorBucketAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Deletes a vector bucket. All vector indexes in the vector bucket must be deleted before the vector bucket can be deleted. To perform this operation, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).
- Permissions
-
You must have the
s3vectors:DeleteVectorBucket
permission to use this operation.
Parameter Syntax
$result = $client->deleteVectorBucket([ 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- vectorBucketArn
-
- Type: string
The ARN of the vector bucket to delete.
- vectorBucketName
-
- Type: string
The name of the vector bucket to delete.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- ConflictException:
The request failed because a vector bucket name or a vector index name already exists. Vector bucket names must be unique within your Amazon Web Services account for each Amazon Web Services Region. Vector index names must be unique within your vector bucket. Choose a different vector bucket name or vector index name, and try again.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
DeleteVectorBucketPolicy
$result = $client->deleteVectorBucketPolicy
([/* ... */]); $promise = $client->deleteVectorBucketPolicyAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Deletes a vector bucket policy. 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:DeleteVectorBucketPolicy
permission to use this operation.
Parameter Syntax
$result = $client->deleteVectorBucketPolicy([ 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- vectorBucketArn
-
- Type: string
The ARN of the vector bucket to delete the policy from.
- vectorBucketName
-
- Type: string
The name of the vector bucket to delete the policy from.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
DeleteVectors
$result = $client->deleteVectors
([/* ... */]); $promise = $client->deleteVectorsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Deletes one or more vectors in 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:DeleteVectors
permission to use this operation.
Parameter Syntax
$result = $client->deleteVectors([ 'indexArn' => '<string>', 'indexName' => '<string>', 'keys' => ['<string>', ...], // REQUIRED 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- indexArn
-
- Type: string
The ARN of the vector index that contains a vector you want to delete.
- indexName
-
- Type: string
The name of the vector index that contains a vector you want to delete.
- keys
-
- Required: Yes
- Type: Array of strings
The keys of the vectors to delete.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- KmsInvalidKeyUsageException:
The request was rejected for one of the following reasons:
-
The
KeyUsage
value of the KMS key is incompatible with the API operation. -
The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key (
KeySpec
).
For more information, see InvalidKeyUsageException in the Amazon Web Services Key Management Service API Reference.
-
- InternalServerException:
The request failed due to an internal server error.
- KmsInvalidStateException:
The key state of the KMS key isn't compatible with the operation.
For more information, see KMSInvalidStateException in the Amazon Web Services Key Management Service API Reference.
- AccessDeniedException:
Access denied.
- KmsNotFoundException:
The KMS key can't be found.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
- KmsDisabledException:
The specified Amazon Web Services KMS key isn't enabled.
GetIndex
$result = $client->getIndex
([/* ... */]); $promise = $client->getIndexAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
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.
Parameter Syntax
$result = $client->getIndex([ 'indexArn' => '<string>', 'indexName' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- indexArn
-
- Type: string
The ARN of the vector index.
- indexName
-
- Type: string
The name of the vector index.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
Result Syntax
[ 'index' => [ 'creationTime' => <DateTime>, 'dataType' => 'float32', 'dimension' => <integer>, 'distanceMetric' => 'euclidean|cosine', 'indexArn' => '<string>', 'indexName' => '<string>', 'metadataConfiguration' => [ 'nonFilterableMetadataKeys' => ['<string>', ...], ], 'vectorBucketName' => '<string>', ], ]
Result Details
Members
- index
-
- Required: Yes
- Type: Index structure
The attributes of the vector index.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
GetVectorBucket
$result = $client->getVectorBucket
([/* ... */]); $promise = $client->getVectorBucketAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Returns vector bucket attributes. 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:GetVectorBucket
permission to use this operation.
Parameter Syntax
$result = $client->getVectorBucket([ 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- vectorBucketArn
-
- Type: string
The ARN of the vector bucket to retrieve information about.
- vectorBucketName
-
- Type: string
The name of the vector bucket to retrieve information about.
Result Syntax
[ 'vectorBucket' => [ 'creationTime' => <DateTime>, 'encryptionConfiguration' => [ 'kmsKeyArn' => '<string>', 'sseType' => 'AES256|aws:kms', ], 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ], ]
Result Details
Members
- vectorBucket
-
- Required: Yes
- Type: VectorBucket structure
The attributes of the vector bucket.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
GetVectorBucketPolicy
$result = $client->getVectorBucketPolicy
([/* ... */]); $promise = $client->getVectorBucketPolicyAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Gets details about a vector bucket policy. 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:GetVectorBucketPolicy
permission to use this operation.
Parameter Syntax
$result = $client->getVectorBucketPolicy([ 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- vectorBucketArn
-
- Type: string
The ARN of the vector bucket.
- vectorBucketName
-
- Type: string
The name of the vector bucket.
Result Syntax
[ 'policy' => '<string>', ]
Result Details
Members
- policy
-
- Type: string
The
JSON
that defines the policy.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
GetVectors
$result = $client->getVectors
([/* ... */]); $promise = $client->getVectorsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Returns vector 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:GetVectors
permission to use this operation.
Parameter Syntax
$result = $client->getVectors([ 'indexArn' => '<string>', 'indexName' => '<string>', 'keys' => ['<string>', ...], // REQUIRED 'returnData' => true || false, 'returnMetadata' => true || false, 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- indexArn
-
- Type: string
The ARN of the vector index.
- indexName
-
- Type: string
The name of the vector index.
- keys
-
- Required: Yes
- Type: Array of strings
The names of the vectors you want to return attributes for.
- returnData
-
- Type: boolean
Indicates whether to include the vector data in the response. The default value is
false
. - returnMetadata
-
- Type: boolean
Indicates whether to include metadata in the response. The default value is
false
. - vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
Result Syntax
[ 'vectors' => [ [ 'data' => [ 'float32' => [<float>, ...], ], 'key' => '<string>', 'metadata' => [ ], ], // ... ], ]
Result Details
Members
- vectors
-
- Required: Yes
- Type: Array of GetOutputVector structures
The attributes of the vectors.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- KmsInvalidKeyUsageException:
The request was rejected for one of the following reasons:
-
The
KeyUsage
value of the KMS key is incompatible with the API operation. -
The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key (
KeySpec
).
For more information, see InvalidKeyUsageException in the Amazon Web Services Key Management Service API Reference.
-
- InternalServerException:
The request failed due to an internal server error.
- KmsInvalidStateException:
The key state of the KMS key isn't compatible with the operation.
For more information, see KMSInvalidStateException in the Amazon Web Services Key Management Service API Reference.
- AccessDeniedException:
Access denied.
- KmsNotFoundException:
The KMS key can't be found.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
- KmsDisabledException:
The specified Amazon Web Services KMS key isn't enabled.
ListIndexes
$result = $client->listIndexes
([/* ... */]); $promise = $client->listIndexesAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Returns 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.
Parameter Syntax
$result = $client->listIndexes([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'prefix' => '<string>', 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of items to be returned in the response.
- nextToken
-
- Type: string
The previous pagination token.
- prefix
-
- Type: string
Limits the response to vector indexes that begin with the specified prefix.
- vectorBucketArn
-
- Type: string
The ARN of the vector bucket that contains the vector indexes.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector indexes.
Result Syntax
[ 'indexes' => [ [ 'creationTime' => <DateTime>, 'indexArn' => '<string>', 'indexName' => '<string>', 'vectorBucketName' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- indexes
-
- Required: Yes
- Type: Array of IndexSummary structures
The attributes of the vector indexes
- nextToken
-
- Type: string
The next pagination token.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
ListVectorBuckets
$result = $client->listVectorBuckets
([/* ... */]); $promise = $client->listVectorBucketsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Returns a list of all the vector buckets that are owned by the authenticated sender of the request.
- Permissions
-
You must have the
s3vectors:ListVectorBuckets
permission to use this operation.
Parameter Syntax
$result = $client->listVectorBuckets([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'prefix' => '<string>', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of vector buckets to be returned in the response.
- nextToken
-
- Type: string
The previous pagination token.
- prefix
-
- Type: string
Limits the response to vector buckets that begin with the specified prefix.
Result Syntax
[ 'nextToken' => '<string>', 'vectorBuckets' => [ [ 'creationTime' => <DateTime>, 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
The element is included in the response when there are more buckets to be listed with pagination.
- vectorBuckets
-
- Required: Yes
- Type: Array of VectorBucketSummary structures
The list of vector buckets owned by the requester.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
ListVectors
$result = $client->listVectors
([/* ... */]); $promise = $client->listVectorsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
List vectors in the specified vector index. 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).
ListVectors
operations proceed sequentially; however, for faster performance on a large number of vectors in a vector index, applications can request a parallel ListVectors
operation by providing the segmentCount
and segmentIndex
parameters.
- Permissions
-
You must have the
s3vectors:ListVectors
permission to use this operation. Additional permissions are required based on the request parameters you specify:-
With only
s3vectors:ListVectors
permission, you can list vector keys whenreturnData
andreturnMetadata
are both set to false or not specified.. -
If you set
returnData
orreturnMetadata
to true, you must have boths3vectors:ListVectors
ands3vectors:GetVectors
permissions. The request fails with a403 Forbidden
error if you request vector data or metadata without thes3vectors:GetVectors
permission.
-
Parameter Syntax
$result = $client->listVectors([ 'indexArn' => '<string>', 'indexName' => '<string>', 'maxResults' => <integer>, 'nextToken' => '<string>', 'returnData' => true || false, 'returnMetadata' => true || false, 'segmentCount' => <integer>, 'segmentIndex' => <integer>, 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- indexArn
-
- Type: string
The Amazon resource Name (ARN) of the vector index.
- indexName
-
- Type: string
The name of the vector index.
- maxResults
-
- Type: int
The maximum number of vectors to return on a page.
If you don't specify
maxResults
, theListVectors
operation uses a default value of 500.If the processed dataset size exceeds 1 MB before reaching the
maxResults
value, the operation stops and returns the vectors that are retrieved up to that point, along with anextToken
that you can use in a subsequent request to retrieve the next set of results. - nextToken
-
- Type: string
Pagination token from a previous request. The value of this field is empty for an initial request.
- returnData
-
- Type: boolean
If true, the vector data of each vector will be included in the response. The default value is
false
. - returnMetadata
-
- Type: boolean
If true, the metadata associated with each vector will be included in the response. The default value is
false
. - segmentCount
-
- Type: int
For a parallel
ListVectors
request,segmentCount
represents the total number of vector segments into which theListVectors
operation will be divided. The value ofsegmentCount
corresponds to the number of application workers that will perform the parallelListVectors
operation. For example, if you want to use four application threads to list vectors in a vector index, specify asegmentCount
value of 4.If you specify a
segmentCount
value of 1, theListVectors
operation will be sequential rather than parallel.If you specify
segmentCount
, you must also specifysegmentIndex
. - segmentIndex
-
- Type: int
For a parallel
ListVectors
request,segmentIndex
is the index of the segment from which to list vectors in the current request. It identifies an individual segment to be listed by an application worker.Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to list vectors in a vector index, then the first thread specifies a
segmentIndex
value of 0, the second thread specifies 1, and so on.The value of
segmentIndex
must be less than the value provided forsegmentCount
.If you provide
segmentIndex
, you must also providesegmentCount
. - vectorBucketName
-
- Type: string
The name of the vector bucket.
Result Syntax
[ 'nextToken' => '<string>', 'vectors' => [ [ 'data' => [ 'float32' => [<float>, ...], ], 'key' => '<string>', 'metadata' => [ ], ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
Pagination token to be used in the subsequent request. The field is empty if no further pagination is required.
- vectors
-
- Required: Yes
- Type: Array of ListOutputVector structures
Vectors in the current segment.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
PutVectorBucketPolicy
$result = $client->putVectorBucketPolicy
([/* ... */]); $promise = $client->putVectorBucketPolicyAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Creates a bucket policy for a 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:PutVectorBucketPolicy
permission to use this operation.
Parameter Syntax
$result = $client->putVectorBucketPolicy([ 'policy' => '<string>', // REQUIRED 'vectorBucketArn' => '<string>', 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- policy
-
- Required: Yes
- Type: string
The
JSON
that defines the policy. For more information about bucket policies for S3 Vectors, see Managing vector bucket policies in the Amazon S3 User Guide. - vectorBucketArn
-
- Type: string
The Amazon Resource Name (ARN) of the vector bucket.
- vectorBucketName
-
- Type: string
The name of the vector bucket.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- InternalServerException:
The request failed due to an internal server error.
- AccessDeniedException:
Access denied.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
PutVectors
$result = $client->putVectors
([/* ... */]); $promise = $client->putVectorsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Adds one or more vectors to a vector index. 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).
For more information about limits, see Limitations and restrictions in the Amazon S3 User Guide.
When inserting vector data into your vector index, you must provide the vector data as float32
(32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and GetVectors
, ListVectors
, and QueryVectors
operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as float32
values regardless of which SDK you're using. For example, in Python, use numpy.float32
or explicitly cast your values.
- Permissions
-
You must have the
s3vectors:PutVectors
permission to use this operation.
Parameter Syntax
$result = $client->putVectors([ 'indexArn' => '<string>', 'indexName' => '<string>', 'vectorBucketName' => '<string>', 'vectors' => [ // REQUIRED [ 'data' => [ // REQUIRED 'float32' => [<float>, ...], ], 'key' => '<string>', // REQUIRED 'metadata' => [ ], ], // ... ], ]);
Parameter Details
Members
- indexArn
-
- Type: string
The ARN of the vector index where you want to write vectors.
- indexName
-
- Type: string
The name of the vector index where you want to write vectors.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
- vectors
-
- Required: Yes
- Type: Array of PutInputVector structures
The vectors to add to a vector index. The number of vectors in a single request must not exceed the resource capacity, otherwise the request will be rejected with the error
ServiceUnavailableException
with the error message "Currently unable to handle the request".
Result Syntax
[]
Result Details
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- KmsInvalidKeyUsageException:
The request was rejected for one of the following reasons:
-
The
KeyUsage
value of the KMS key is incompatible with the API operation. -
The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key (
KeySpec
).
For more information, see InvalidKeyUsageException in the Amazon Web Services Key Management Service API Reference.
-
- InternalServerException:
The request failed due to an internal server error.
- KmsInvalidStateException:
The key state of the KMS key isn't compatible with the operation.
For more information, see KMSInvalidStateException in the Amazon Web Services Key Management Service API Reference.
- AccessDeniedException:
Access denied.
- KmsNotFoundException:
The KMS key can't be found.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
- KmsDisabledException:
The specified Amazon Web Services KMS key isn't enabled.
QueryVectors
$result = $client->queryVectors
([/* ... */]); $promise = $client->queryVectorsAsync
([/* ... */]);
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response), the vector data, and metadata of each vector in the response.
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:QueryVectors
permission to use this operation. Additional permissions are required based on the request parameters you specify:-
With only
s3vectors:QueryVectors
permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request vector data or metadata (by keeping thereturnMetadata
parameter set tofalse
or not specified). -
If you specify a metadata filter or set
returnMetadata
to true, you must have boths3vectors:QueryVectors
ands3vectors:GetVectors
permissions. The request fails with a403 Forbidden error
if you request metadata filtering, vector data, or metadata without thes3vectors:GetVectors
permission.
-
Parameter Syntax
$result = $client->queryVectors([ 'filter' => [ ], 'indexArn' => '<string>', 'indexName' => '<string>', 'queryVector' => [ // REQUIRED 'float32' => [<float>, ...], ], 'returnDistance' => true || false, 'returnMetadata' => true || false, 'topK' => <integer>, // REQUIRED 'vectorBucketName' => '<string>', ]);
Parameter Details
Members
- filter
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
Metadata filter to apply during the query. For more information about metadata keys, see Metadata filtering in the Amazon S3 User Guide.
- indexArn
-
- Type: string
The ARN of the vector index that you want to query.
- indexName
-
- Type: string
The name of the vector index that you want to query.
- queryVector
-
- Required: Yes
- Type: VectorData structure
The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.
- returnDistance
-
- Type: boolean
Indicates whether to include the computed distance in the response. The default value is
false
. - returnMetadata
-
- Type: boolean
Indicates whether to include metadata in the response. The default value is
false
. - topK
-
- Required: Yes
- Type: int
The number of results to return for each query.
- vectorBucketName
-
- Type: string
The name of the vector bucket that contains the vector index.
Result Syntax
[ 'vectors' => [ [ 'data' => [ 'float32' => [<float>, ...], ], 'distance' => <float>, 'key' => '<string>', 'metadata' => [ ], ], // ... ], ]
Result Details
Members
- vectors
-
- Required: Yes
- Type: Array of QueryOutputVector structures
The vectors in the approximate nearest neighbor search.
Errors
- ValidationException:
The requested action isn't valid.
- ServiceUnavailableException:
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
- TooManyRequestsException:
The request was denied due to request throttling.
- KmsInvalidKeyUsageException:
The request was rejected for one of the following reasons:
-
The
KeyUsage
value of the KMS key is incompatible with the API operation. -
The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key (
KeySpec
).
For more information, see InvalidKeyUsageException in the Amazon Web Services Key Management Service API Reference.
-
- InternalServerException:
The request failed due to an internal server error.
- KmsInvalidStateException:
The key state of the KMS key isn't compatible with the operation.
For more information, see KMSInvalidStateException in the Amazon Web Services Key Management Service API Reference.
- AccessDeniedException:
Access denied.
- KmsNotFoundException:
The KMS key can't be found.
- NotFoundException:
The request was rejected because the specified resource can't be found.
- ServiceQuotaExceededException:
Your request exceeds a service quota.
- KmsDisabledException:
The specified Amazon Web Services KMS key isn't enabled.
Shapes
AccessDeniedException
Description
Access denied.
Members
- message
-
- Required: Yes
- Type: string
ConflictException
Description
The request failed because a vector bucket name or a vector index name already exists. Vector bucket names must be unique within your Amazon Web Services account for each Amazon Web Services Region. Vector index names must be unique within your vector bucket. Choose a different vector bucket name or vector index name, and try again.
Members
- message
-
- Required: Yes
- Type: string
Document
Members
EncryptionConfiguration
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The encryption configuration for a vector bucket. 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
.
Members
- kmsKeyArn
-
- Type: string
Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the encryption configuration. This parameter is allowed if and only if
sseType
is set toaws:kms
.To specify the KMS key, you must use the format of the KMS key Amazon Resource Name (ARN).
For example, specify Key ARN in the following format:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- sseType
-
- Type: string
The server-side encryption type to use for the encryption configuration of the vector bucket. 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
.
GetOutputVector
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector returned by the GetVectors
operation.
Members
- data
-
- Type: VectorData structure
The vector data of the vector.
- key
-
- Required: Yes
- Type: string
The name of the vector.
- metadata
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
Metadata about the vector.
Index
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector index.
Members
- creationTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Date and time when the vector index was created.
- dataType
-
- Required: Yes
- Type: string
The data type of the vectors inserted into the vector index.
- dimension
-
- Required: Yes
- Type: int
The number of values in the vectors that are inserted into the vector index.
- distanceMetric
-
- Required: Yes
- Type: string
The distance metric to be used for similarity search.
- indexArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the vector index.
- indexName
-
- Required: Yes
- Type: string
The name of the vector index.
- metadataConfiguration
-
- Type: MetadataConfiguration structure
The metadata configuration for the vector index.
- vectorBucketName
-
- Required: Yes
- Type: string
The name of the vector bucket that contains the vector index.
IndexSummary
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Summary information about a vector index.
Members
- creationTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Date and time when the vector index was created.
- indexArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the vector index.
- indexName
-
- Required: Yes
- Type: string
The name of the vector index.
- vectorBucketName
-
- Required: Yes
- Type: string
The name of the vector bucket that contains the vector index.
InternalServerException
Description
The request failed due to an internal server error.
Members
- message
-
- Required: Yes
- Type: string
KmsDisabledException
Description
The specified Amazon Web Services KMS key isn't enabled.
Members
- message
-
- Required: Yes
- Type: string
KmsInvalidKeyUsageException
Description
The request was rejected for one of the following reasons:
-
The
KeyUsage
value of the KMS key is incompatible with the API operation. -
The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key (
KeySpec
).
For more information, see InvalidKeyUsageException in the Amazon Web Services Key Management Service API Reference.
Members
- message
-
- Required: Yes
- Type: string
KmsInvalidStateException
Description
The key state of the KMS key isn't compatible with the operation.
For more information, see KMSInvalidStateException in the Amazon Web Services Key Management Service API Reference.
Members
- message
-
- Required: Yes
- Type: string
KmsNotFoundException
Description
The KMS key can't be found.
Members
- message
-
- Required: Yes
- Type: string
ListOutputVector
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector returned by the ListVectors
operation.
Members
- data
-
- Type: VectorData structure
The vector data of the vector.
- key
-
- Required: Yes
- Type: string
The name of the vector.
- metadata
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
Metadata about the vector.
MetadataConfiguration
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The metadata configuration for a vector index.
Members
- nonFilterableMetadataKeys
-
- Required: Yes
- Type: Array of strings
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.
NotFoundException
Description
The request was rejected because the specified resource can't be found.
Members
- message
-
- Required: Yes
- Type: string
PutInputVector
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector to add to a vector index.
Members
- data
-
- Required: Yes
- Type: VectorData structure
The vector data of the vector.
Vector dimensions must match the dimension count that's configured for the vector index.
-
For the
cosine
distance metric, zero vectors (vectors containing all zeros) aren't allowed. -
For both
cosine
andeuclidean
distance metrics, vector data must contain only valid floating-point values. Invalid values such as NaN (Not a Number) or Infinity aren't allowed.
- key
-
- Required: Yes
- Type: string
The name of the vector. The key uniquely identifies the vector in a vector index.
- metadata
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
Metadata about the vector. All metadata entries undergo validation to ensure they meet the format requirements for size and data types.
QueryOutputVector
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector in the approximate nearest neighbor search.
Members
- data
-
- Type: VectorData structure
The vector data associated with the vector, if requested.
- distance
-
- Type: float
The measure of similarity between the vector in the response and the query vector.
- key
-
- Required: Yes
- Type: string
The key of the vector in the approximate nearest neighbor search.
- metadata
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The metadata associated with the vector, if requested.
ServiceQuotaExceededException
Description
Your request exceeds a service quota.
Members
- message
-
- Required: Yes
- Type: string
ServiceUnavailableException
Description
The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.
Members
- message
-
- Required: Yes
- Type: string
TooManyRequestsException
Description
The request was denied due to request throttling.
Members
- message
-
- Required: Yes
- Type: string
ValidationException
Description
The requested action isn't valid.
Members
- fieldList
-
- Type: Array of ValidationExceptionField structures
A list of specific validation failures that are encountered during input processing. Each entry in the list contains a path to the field that failed validation and a detailed message that explains why the validation failed. To satisfy multiple constraints, a field can appear multiple times in this list if it failed. You can use the information to identify and fix the specific validation issues in your request.
- message
-
- Required: Yes
- Type: string
ValidationExceptionField
Description
Contains information about a validation exception.
Members
- message
-
- Required: Yes
- Type: string
A message about the validation exception.
- path
-
- Required: Yes
- Type: string
A path about the validation exception.
VectorBucket
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector bucket.
Members
- creationTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Date and time when the vector bucket was created.
- encryptionConfiguration
-
- Type: EncryptionConfiguration structure
The encryption configuration for the vector bucket.
- vectorBucketArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the vector bucket.
- vectorBucketName
-
- Required: Yes
- Type: string
The name of the vector bucket.
VectorBucketSummary
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Summary information about a vector bucket.
Members
- creationTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Date and time when the vector bucket was created.
- vectorBucketArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the vector bucket.
- vectorBucketName
-
- Required: Yes
- Type: string
The name of the vector bucket.
VectorData
Description
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The vector data in different formats.
Members
- float32
-
- Type: Array of floats
The vector data as 32-bit floating point numbers. The number of elements in this array must exactly match the dimension of the vector index where the operation is being performed.