generative-ai-cdk-constructs

Amazon OpenSearch Serverless Construct Library


Stability: Experimental

All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Language Package
Typescript Logo TypeScript @cdklabs/generative-ai-cdk-constructs
Python Logo Python cdklabs.generative_ai_cdk_constructs

This construct library extends the automatically generated L1 constructs to provide an L2 construct for a vector collection.

Table of contents

API

See the API documentation.

Vector Collection

This resource creates an Amazon OpenSearch Serverless collection configured for VECTORSEARCH. It creates default encryption, network, and data policies for use with Amazon Bedrock Knowledge Bases. For encryption, it uses the default AWS owned KMS key. It allows network connections from the public internet, but access is restricted to specific IAM principals.

Granting Data Access

The grantDataAccess method grants the specified role access to read and write the data in the collection.