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 | @cdklabs/generative-ai-cdk-constructs |
Python | cdklabs.generative_ai_cdk_constructs |
This construct library extends the automatically generated L1 constructs to provide an L2 construct for a vector collection.
See the API documentation.
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.
The grantDataAccess
method grants the specified role access to read and write the data in the collection.