> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# KnowledgeBaseAttributes

Attributes for referencing an existing knowledge base.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`bedrock/knowledge-bases/knowledge-base.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/knowledge-bases/knowledge-base.ts#L120)
- Type last changed: v2.274.0-alpha.0 · 21 Oct 2026

## Example

```ts
declare const role: iam.Role;

const byArn = bedrock.KnowledgeBase.fromKnowledgeBaseArn(this, 'ImportedByArn',
  'arn:aws:bedrock:us-east-1:123456789012:knowledge-base/KB12345678');

// Assumed to be in the same account and region as this stack
const byId = bedrock.KnowledgeBase.fromKnowledgeBaseId(this, 'ImportedById', 'KB12345678');

const withRole = bedrock.KnowledgeBase.fromKnowledgeBaseAttributes(this, 'ImportedWithRole', {
  knowledgeBaseArn: 'arn:aws:bedrock:us-east-1:123456789012:knowledge-base/KB12345678',
  role,
});
```

## Properties

- `knowledgeBaseArn`: string (required) — The ARN of the knowledge base.

- `role`: any = the role is unknown — The service role of the knowledge base.
