aws-cdk: bedrock: KnowledgeBaseConfigurationProperty is missing sqlKnowledgeBaseConfiguration property in latest CDK version 2.176.0
Describe the bug
KnowledgeBaseConfigurationProperty is missing the sqlKnowledgeBaseConfiguration property which is currently supported by CloudFormation AWS::Bedrock::KnowledgeBase KnowledgeBaseConfiguration
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
sqlKnowledgeBaseConfiguration should not be missing in L1 construct.
Current Behavior
CDK gives the following error:
Object literal may only specify known properties, and 'sqlKnowledgeBaseConfiguration' does not exist in type 'IResolvable | KnowledgeBaseConfigurationProperty'.
Reproduction Steps
Here’s a sample code to replicate the error:
new bedrock.CfnKnowledgeBase(this, 'knowledgebase', {
knowledgeBaseConfiguration: {
type: 'type',
vectorKnowledgeBaseConfiguration: {
embeddingModelArn: 'embeddingModelArn'
},
kendraKnowledgeBaseConfiguration: {
kendraIndexArn: 'kendraIndexArn'
}
sqlKnowledgeBaseConfiguration:{
type: 'REDSHIFT'
}
},
roleArn: 'roleName',
name: 'Name'
})
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.176.0
Framework Version
No response
Node.js Version
v18.20.5
OS
Linux
Language
TypeScript
Language Version
5.3.3
Other information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 15 (6 by maintainers)
The
storage_configurationstill does not work withtype=AWS_DATA_CATALOG. Deploying this stack creates the knowledge base but does not connect the query engine. It works when I create the knowledge base with the same configuration using the console.hi all,
i’ve also faced the same binding issue that @dave-moser mentioned.
I think you are correct. Other data sources require another CF construct to pass in more detail.
This CF construct does not have parameters for Redshift. The above code throws an error.
Where do I report such an issue with CloudFormation?
FYI - I am able to successfully create the working KB with Redshift using the Boto3 API.
Thanks @dave-moser for raising this issue. I believe the issue of being unable to bind the knowledge base to redshift is a service side issue, since as I understood from your reply that the missing properties are now exist in the L1 construct which is actually one to one mapping with the CFN resources, and CDK do not add any logic.
Could you please check the synthesized CFN template and confirm if this is what you expect.
Thank you for that update. SqlKnowledgeBaseConfiguration is now available in cdk version 2.177.0
It does create the Bedrock KnowledgeBase, however, it does not successfully bind the KB to the Redshift serverless cluster.
CDK Code:
Console screenshot (no Query Engine created):