AWS S3 Vectors
Store and query vector embeddings using AWS S3 Vectors with similarity search.
What’s inside
-
AWS S3 Vectors component, URI syntax:
aws2-s3-vectors://vectorBucketName
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-aws2-s3-vectors-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 34 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.aws2-s3-vectors.access-key | The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless s3VectorsClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-s3-vectors.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.aws2-s3-vectors.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.aws2-s3-vectors.configuration | The component configuration. The option is a org.apache.camel.component.aws2.s3vectors.AWS2S3VectorsConfiguration type. | AWS2S3VectorsConfiguration | |
camel.component.aws2-s3-vectors.consumer-metadata-filter | The metadata filter of the similarity search of the consumer, as a JSON object with the filter operators of S3 Vectors, such as \{genre: \{$eq: drama}}. Only the vectors whose metadata match the filter are consumed. | String | |
camel.component.aws2-s3-vectors.consumer-query-vector | The query vector of the similarity search that the consumer runs at each poll, as numbers separated by commas, such as 0.1,0.2,0.3, as many as the dimension of the index. The consumer skips a value that is not a number, with a warning. If not set, the polls consume nothing. | String | |
camel.component.aws2-s3-vectors.data-type | The data type of the vectors of the index to create. S3 Vectors supports float32 only. | float32 | String |
camel.component.aws2-s3-vectors.delay | The time between two polls of the consumer, in milliseconds unless the timeUnit option sets another unit. | 500 | Long |
camel.component.aws2-s3-vectors.delete-after-read | Whether the consumer deletes each consumed vector from the index after its exchange completes successfully. A vector whose exchange fails is not deleted, and a later poll consumes it again. If false, the consumer keeps the keys of the consumed vectors in memory and does not consume these vectors again until it is restarted. | false | Boolean |
camel.component.aws2-s3-vectors.distance-metric | The distance metric of the index to create, which the similarity search uses. Options: cosine, euclidean | cosine | String |
camel.component.aws2-s3-vectors.enabled | Whether to enable auto configuration of the aws2-s3-vectors component. This is enabled by default. | Boolean | |
camel.component.aws2-s3-vectors.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.aws2-s3-vectors.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.aws2-s3-vectors.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.aws2-s3-vectors.max-messages-per-poll | The maximum number of vectors that one poll of the consumer asks for: the similarity search returns at most the lower of topK and this value. A poll consumes fewer when some of them were consumed before. Set 0 or a negative value to use topK alone. | 10 | Integer |
camel.component.aws2-s3-vectors.operation | The operation that the producer performs. The CamelAwsS3VectorsOperation header replaces this option. If neither is set, the producer fails. | AWS2S3VectorsOperations | |
camel.component.aws2-s3-vectors.override-endpoint | Whether the S3 Vectors client sends the requests to the URI of the uriEndpointOverride option instead of the S3 Vectors endpoint of the region. It has no effect when uriEndpointOverride is not set. | false | Boolean |
camel.component.aws2-s3-vectors.profile-credentials-name | The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change. | String | |
camel.component.aws2-s3-vectors.proxy-host | The host name of the proxy that the S3 Vectors client uses. The client uses a proxy only when the proxyPort option is set too. | String | |
camel.component.aws2-s3-vectors.proxy-port | The port of the proxy that the S3 Vectors client uses. The client uses a proxy only when the proxyHost option is set too. | Integer | |
camel.component.aws2-s3-vectors.proxy-protocol | The protocol of the proxy that the S3 Vectors client uses. It is used only when the proxyHost and proxyPort options are both set. | https | Protocol |
camel.component.aws2-s3-vectors.region | The ID of the AWS region of the S3 Vectors service, in lower case, for example eu-west-1 (the value of Region.EU_WEST_1.id()). If not set, the AWS SDK resolves the region itself, for example from the AWS_REGION environment variable. | String | |
camel.component.aws2-s3-vectors.s3-vectors-client | To use a custom software.amazon.awssdk.services.s3vectors.S3VectorsClient, which is autowired when the registry has a single one. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used. The endpoint does not close a client that is set or autowired. The option is a software.amazon.awssdk.services.s3vectors.S3VectorsClient type. | S3VectorsClient | |
camel.component.aws2-s3-vectors.secret-key | The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless s3VectorsClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-s3-vectors.session-token | The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. All three are then required: if one of the three is missing, creating the client fails. | String | |
camel.component.aws2-s3-vectors.top-k | The number of nearest vectors that a similarity search returns. It is used by queryVectors, where the CamelAwsS3VectorsTopK header replaces it, and by each poll of the consumer, where a positive maxMessagesPerPoll caps it. | 10 | Integer |
camel.component.aws2-s3-vectors.trust-all-certificates | Whether the S3 Vectors client accepts any TLS certificate of the server without checking it. It applies whether or not the endpoint is overridden. Use it only for tests, for example with a local emulator. | false | Boolean |
camel.component.aws2-s3-vectors.uri-endpoint-override | The URI that the S3 Vectors client sends the requests to, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true. | String | |
camel.component.aws2-s3-vectors.use-default-credentials-provider | Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options. | false | Boolean |
camel.component.aws2-s3-vectors.use-profile-credentials-provider | Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials. | false | Boolean |
camel.component.aws2-s3-vectors.use-session-credentials | Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true. | false | Boolean |
camel.component.aws2-s3-vectors.vector-dimensions | The dimension of the index that createVectorIndex creates: the number of values of each vector, which must match the embedding model, for example 1536 for OpenAI text-embedding-3-small. The CamelAwsS3VectorsVectorDimensions header replaces it. Only createVectorIndex uses it. | 1536 | Integer |
camel.component.aws2-s3-vectors.vector-index-name | The name of the vector index that the consumer and the producer operations on vectors (putVectors, queryVectors, getVectors, deleteVectors) and on an index (createVectorIndex, deleteVectorIndex, describeVectorIndex) use. The CamelAwsS3VectorsVectorIndexName header replaces it for one message of the producer. The consumer requires it. | String | |
camel.component.aws2-s3-vectors.similarity-threshold | (deprecated) Never used: S3 Vectors has no similarity threshold. The consumer sets the CamelAwsS3VectorsDistance header to the distance of each vector from the query vector. Deprecation note: S3 Vectors has no similarity threshold, the component never used this option. Filter the results on their CamelAwsS3VectorsDistance header instead. | Float |