bimnett.CdkS3Vectors
0.1.0
See the version list below for details.
dotnet add package bimnett.CdkS3Vectors --version 0.1.0
NuGet\Install-Package bimnett.CdkS3Vectors -Version 0.1.0
<PackageReference Include="bimnett.CdkS3Vectors" Version="0.1.0" />
<PackageVersion Include="bimnett.CdkS3Vectors" Version="0.1.0" />
<PackageReference Include="bimnett.CdkS3Vectors" />
paket add bimnett.CdkS3Vectors --version 0.1.0
#r "nuget: bimnett.CdkS3Vectors, 0.1.0"
#:package bimnett.CdkS3Vectors@0.1.0
#addin nuget:?package=bimnett.CdkS3Vectors&version=0.1.0
#tool nuget:?package=bimnett.CdkS3Vectors&version=0.1.0
cdk-s3-vectors
⚠️ Maintenance Notice: This library is intended as a temporary solution and will only be maintained until AWS CloudFormation and CDK introduce native support for Amazon S3 Vectors. Once native support is available, users are encouraged to migrate to the official AWS constructs.
Reference Documentation
Supported Languages
Language | Package |
---|---|
cdk-s3-vectors |
|
cdk-s3-vectors |
|
bimnett.CdkS3Vectors |
Overview
Amazon S3 Vectors is in preview release and provides native vector storage and similarity search capabilities within Amazon S3.
This AWS CDK construct library provides high-level constructs for Amazon S3 Vectors, enabling you to create vector buckets, indexes, and knowledge bases for AI/ML applications.
The library includes three main constructs:
- Bucket: Creates S3 vector buckets with optional encryption
- Index: Creates vector indexes within buckets for similarity search
- KnowledgeBase: Creates Amazon Bedrock knowledge bases using S3 Vectors as the vector store
Examples
For complete, deployable examples in all supported languages, see the examples directory.
Bucket Construct Props
Name | Type | Description |
---|---|---|
vectorBucketName |
string |
The name of the vector bucket to create. |
encryptionConfiguration? |
EncryptionConfiguration |
Optional encryption configuration for the vector bucket. Defaults to AES256. |
Index Construct Props
Name | Type | Description |
---|---|---|
vectorBucketName |
string |
The name of the vector bucket to create the index in. |
indexName |
string |
The name of the vector index to create. |
dataType |
'float32' |
The data type of the vectors in the index. |
dimension |
number |
The dimensions of the vectors (1-4096). |
distanceMetric |
'euclidean' \| 'cosine' |
The distance metric for similarity search. |
metadataConfiguration? |
MetadataConfiguration |
Optional metadata configuration for the index. |
KnowledgeBase Construct Props
Name | Type | Description |
---|---|---|
knowledgeBaseName |
string |
The name of the knowledge base to create. |
knowledgeBaseConfiguration |
KnowledgeBaseConfiguration |
Vector embeddings configuration details. |
vectorBucketArn |
string |
The ARN of the S3 vector bucket. |
indexArn |
string |
The ARN of the vector index. |
description? |
string |
Optional description of the knowledge base. |
clientToken? |
string |
Optional idempotency token (≥33 characters). |
Pattern Properties
Name | Type | Description |
---|---|---|
vectorBucketName |
string |
Returns the name of the created vector bucket |
vectorBucketArn |
string |
Returns the ARN of the created vector bucket |
indexArn |
string |
Returns the ARN of the created vector index |
indexName |
string |
Returns the name of the created vector index |
knowledgeBaseId |
string |
Returns the ID of the created knowledge base |
knowledgeBaseArn |
string |
Returns the ARN of the created knowledge base |
Default Settings
Out of the box implementation of the constructs without any override will set the following defaults:
Amazon S3 Vector Bucket
- Server-side encryption with Amazon S3 managed keys (SSE-S3) using AES256
- Least privilege IAM permissions for vector operations
- Custom resource handlers for bucket lifecycle management
Vector Index
- Support for float32 data type vectors
- Configurable dimensions (1-4096)
- Choice of euclidean or cosine distance metrics
- Optional metadata configuration for enhanced search capabilities
Amazon Bedrock Knowledge Base
- Integration with S3 Vectors as the vector store
- Configurable embedding models
- IAM role with least privilege permissions
- Support for various embedding data types and dimensions
Architecture
graph TB
subgraph "AWS Account"
subgraph "S3 Vectors"
VB[Vector Bucket]
VI[Vector Index]
end
subgraph "Amazon Bedrock"
KB[Knowledge Base]
EM[Embedding Model]
end
subgraph "IAM"
KBR[Knowledge Base Role]
LR[Lambda Execution Roles]
end
subgraph "AWS Lambda"
BH[Bucket Handler]
IH[Index Handler]
KBH[Knowledge Base Handler]
end
subgraph "CloudFormation"
CR1[Custom Resource 1]
CR2[Custom Resource 2]
CR3[Custom Resource 3]
end
end
CR1 --> BH
CR2 --> IH
CR3 --> KBH
BH --> VB
IH --> VI
KBH --> KB
VI -.-> VB
KB --> VI
KB --> EM
KB --> KBR
KBR --> VB
KBR --> VI
LR --> BH
LR --> IH
LR --> KBH
License
This project is licensed under the Apache License 2.0. See LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Amazon.CDK.Lib (>= 2.205.0 && < 3.0.0)
- Amazon.JSII.Runtime (>= 1.113.0 && < 2.0.0)
- Constructs (>= 10.0.5 && < 11.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.