Skip to content

Bedrock Managed Knowledge Bases: When will Cloud Formation Type and CDK support be available?

0

The Bedrock Managed Knowledge Base Product (with an S3 backed Vector Store) was released on the 17th of June ... but there is not a Cloud Formation Type yet and therefore no support in CDK. Doesn't enyone here have an idea how long it takes for them to add this support?

asked 14 days ago70 views

2 Answers
1

Hello.

CloudFormation itself supports managed knowledge bases.
You can create one as follows:
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/TemplateReference/aws-properties-bedrock-knowledgebase-managedknowledgebaseconfiguration.html

  BedrockKnowledgeBase:
    Type: AWS::Bedrock::KnowledgeBase
    Properties:
      Name: test-kb
      Description: test kb
      RoleArn: !GetAtt IAMRole.Arn
      KnowledgeBaseConfiguration:
        Type: MANAGED

  DataSource:
    Type: AWS::Bedrock::DataSource
    Properties:
      Name: test-datasource
      KnowledgeBaseId: !GetAtt BedrockKnowledgeBase.KnowledgeBaseId
      DataSourceConfiguration:
        Type: MANAGED_KNOWLEDGE_BASE_CONNECTOR
        ManagedKnowledgeBaseConnectorConfiguration:
          ConnectorParameters:
            type: S3
            version: "1"
            connectionConfiguration:
              bucketName: !Ref DataSourceBucket
              bucketOwnerAccountId: !Ref AWS::AccountId

If you look at the following documentation, you will see that properties for managed knowledge bases are available, so it may be possible to execute this.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnKnowledgeBase.ManagedKnowledgeBaseConfigurationProperty.html

EXPERT

answered 14 days ago

EXPERT

reviewed 14 days ago

0

CloudFormation support for Amazon Bedrock Knowledge Bases is already available. CloudFormation support for both Amazon Bedrock Agents and Amazon Bedrock Knowledge Bases was introduced on April 5, 2024. This means you can now set up and manage your Amazon Bedrock Knowledge Bases resources using CloudFormation.

Since CloudFormation support is available, AWS CDK support is also available, as CDK generates CloudFormation templates. The CDK provides constructs for creating managed knowledge bases, including the CfnKnowledgeBase construct which allows you to configure various aspects such as the knowledge base configuration, storage configuration, and embedding models. You can use CDK to create knowledge bases with different storage backends, including S3-backed vector stores with OpenSearch Serverless.

The CDK constructs include properties for configuring managed knowledge base settings, such as ManagedKnowledgeBaseConfigurationProperty for embedding model configuration and ManagedKnowledgeBaseConnectorConfigurationProperty for connector data sources. These are available across multiple programming languages including Python, TypeScript, Java, Go, and .NET.

If you're experiencing issues finding or using these resources, ensure you're using the latest version of the AWS CDK, as the support has been available since early April 2024.
Sources
Document history for the Amazon Bedrock User Guide - Amazon Bedrock
interface ManagedKnowledgeBaseConfigurationProperty · AWS CDK
Use the AWS CDK to create an Amazon Bedrock agent | AWS re:Post
interface ManagedKnowledgeBaseConnectorConfigurationProperty · AWS CDK

answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.