aws / aws/aws-cdk

(aws-bedrock-alpha): add BedrockFoundationModel for Claude Sonnet 5

Open Beginner friendly
#38,556 1 comment 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-bedrock-alpha effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

The `BedrockFoundationModel` class in `@aws-cdk/aws-bedrock-alpha` ([`bedrock/models.ts`](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-bedrock-alpha/bedrock/models.ts)) has no predefined constant for Anthropic's Claude Sonnet 5 (`anthropic.claude-sonnet-5`), which is generally available on Amazon Bedrock. The newest Anthropic entries in the file are Claude Opus 4.1 (`anthropic.claude-opus-4-1-20250805-v1:0`) and Claude Sonnet 4 (`anthropic.claude-sonnet-4-20250514-v1:0`).

The core `aws-cdk-lib` `FoundationModelIdentifier` class already gained `anthropic.claude-sonnet-5` (#38271), but the alpha module's `BedrockFoundationModel` was not updated alongside it.

### Use Case

Referencing Claude Sonnet 5 through the L2 Bedrock constructs (agents, cross-region inference profiles) the same way as the other predefined Anthropic models, instead of hand-constructing the model definition.

### Proposed Solution

Add a constant to `BedrockFoundationModel`, e.g.:

```ts
public static readonly ANTHROPIC_CLAUDE_SONNET_5 = new BedrockFoundationModel(
'anthropic.claude-sonnet-5',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);
```

Current workaround is instantiating `BedrockFoundationModel` directly with the model ID and capability flags, as above.

### Other Information

Related: #38271 (same request for `FoundationModelIdentifier` in `aws-cdk-lib` `aws-bedrock`, now resolved).

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.263.0 (`@aws-cdk/aws-bedrock-alpha@2.263.0-alpha.0`)

### Environment details (OS name and version, etc.)

macOS (Darwin 25.6.0)

Contributor guide

Open the contributing guide

Research direction

Start in packages/@aws-cdk/aws-bedrock-alpha/bedrock/models.ts and compare the existing Anthropic model constants with the related FoundationModelIdentifier change in #38271. Done means BedrockFoundationModel exposes Claude Sonnet 5 with model ID anthropic.claude-sonnet-5 and the capability flags described in the issue, so L2 Bedrock constructs can reference it directly.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.