aws / aws/aws-cdk

bedrock: KnowledgeBaseConfigurationProperty is missing sqlKnowledgeBaseConfiguration property in latest CDK version 2.176.0

Open
#32,972 16 comments 2 reactions 0 assignees View on GitHub
@aws-cdk/aws-cloudformation bug needs-cfn p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

[KnowledgeBaseConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnKnowledgeBase.KnowledgeBaseConfigurationProperty.html) is missing the `sqlKnowledgeBaseConfiguration` property which is currently supported by CloudFormation AWS::Bedrock::KnowledgeBase [KnowledgeBaseConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html)

### 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_

Contributor guide

Open the contributing guide

Research direction

Start by comparing the KnowledgeBaseConfigurationProperty API documentation with the CloudFormation KnowledgeBaseConfiguration documentation, then reproduce the TypeScript error using the provided CfnKnowledgeBase example on CDK 2.176.0. Done means sqlKnowledgeBaseConfiguration is accepted by the L1 construct and the example no longer produces the unknown-property error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.