Skip to content

Commit e8df94b

Browse files
committed
Update the documentation to add description s3_vectors_configuration
including an example usage
1 parent 876fefc commit e8df94b

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

website/docs/r/bedrockagent_knowledge_base.html.markdown

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,48 @@ resource "aws_bedrockagent_knowledge_base" "example" {
8383
}
8484
```
8585

86+
### S3 Vectors Configuration
87+
88+
```terraform
89+
resource "aws_s3vectors_vector_bucket" "example" {
90+
vector_bucket_name = "example-bucket"
91+
}
92+
93+
resource "aws_s3vectors_index" "example" {
94+
index_name = "example-index"
95+
vector_bucket_name = aws_s3vectors_vector_bucket.example.vector_bucket_name
96+
97+
data_type = "float32"
98+
dimension = 256
99+
distance_metric = "euclidean"
100+
}
101+
102+
resource "aws_bedrockagent_knowledge_base" "example" {
103+
name = "example-s3vectors-kb"
104+
role_arn = aws_iam_role.example.arn
105+
106+
knowledge_base_configuration {
107+
vector_knowledge_base_configuration {
108+
embedding_model_arn = "arn:aws:bedrock:us-west-2::foundation-model/amazon.titan-embed-text-v2:0"
109+
embedding_model_configuration {
110+
bedrock_embedding_model_configuration {
111+
dimensions = 256
112+
embedding_data_type = "FLOAT32"
113+
}
114+
}
115+
}
116+
type = "VECTOR"
117+
}
118+
119+
storage_configuration {
120+
type = "S3_VECTORS"
121+
s3_vectors_configuration {
122+
index_arn = aws_s3vectors_index.example.index_arn
123+
}
124+
}
125+
}
126+
```
127+
86128
## Argument Reference
87129

88130
The following arguments are required:
@@ -149,11 +191,12 @@ The `s3_location` configuration block supports the following arguments:
149191

150192
The `storage_configuration` configuration block supports the following arguments:
151193

152-
* `type` - (Required) Vector store service in which the knowledge base is stored. Valid Values: `OPENSEARCH_SERVERLESS`, `PINECONE`, `REDIS_ENTERPRISE_CLOUD`, `RDS`.
194+
* `type` - (Required) Vector store service in which the knowledge base is stored. Valid Values: `OPENSEARCH_SERVERLESS`, `PINECONE`, `REDIS_ENTERPRISE_CLOUD`, `RDS`, `S3_VECTORS`.
153195
* `opensearch_serverless_configuration` - (Optional) The storage configuration of the knowledge base in Amazon OpenSearch Service. See [`opensearch_serverless_configuration` block](#opensearch_serverless_configuration-block) for details.
154196
* `pinecone_configuration` - (Optional) The storage configuration of the knowledge base in Pinecone. See [`pinecone_configuration` block](#pinecone_configuration-block) for details.
155197
* `rds_configuration` - (Optional) Details about the storage configuration of the knowledge base in Amazon RDS. For more information, see [Create a vector index in Amazon RDS](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html). See [`rds_configuration` block](#rds_configuration-block) for details.
156198
* `redis_enterprise_cloud_configuration` - (Optional) The storage configuration of the knowledge base in Redis Enterprise Cloud. See [`redis_enterprise_cloud_configuration` block](#redis_enterprise_cloud_configuration-block) for details.
199+
* `s3_vectors_configuration` - (Optional) The storage configuration of the knowledge base in Amazon S3 Vectors. See [`s3_vectors_configuration` block](#s3_vectors_configuration-block) for details.
157200

158201
### `opensearch_serverless_configuration` block
159202

@@ -204,6 +247,15 @@ The `redis_enterprise_cloud_configuration` configuration block supports the foll
204247
* `vector_field` - (Required) Name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
205248
* `vector_index_name` - (Required) Name of the vector index.
206249

250+
### `s3_vectors_configuration` block
251+
252+
The `s3_vectors_configuration` configuration block supports the following arguments.
253+
Either `index_arn`, or both `index_name` and `vector_bucket_arn` must be specified.
254+
255+
* `index_arn` - (Optional) ARN of the S3 Vectors index. Conflicts with `index_name` and `vector_bucket_arn`.
256+
* `index_name` - (Optional) Name of the S3 Vectors index. Must be specified with `vector_bucket_arn`. Conflicts with `index_arn`.
257+
* `vector_bucket_arn` - (Optional) ARN of the S3 Vectors vector bucket. Must be specified with `index_name`. Conflicts with `index_arn`.
258+
207259
## Attribute Reference
208260

209261
This resource exports the following attributes in addition to the arguments above:

0 commit comments

Comments
 (0)