Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-bedrock-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ Use the `grantProfileUsage` method to grant appropriate permissions to resources
// Create an application inference profile
const profile = new bedrock.ApplicationInferenceProfile(this, 'MyProfile', {
applicationInferenceProfileName: 'my-profile',
modelSource: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
modelSource: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_4_5_V1_0,
});

// Create a Lambda function
Expand All @@ -1503,7 +1503,7 @@ profile.grantProfileUsage(lambdaFunction);
// Use a system defined inference profile
const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_4_5_V1_0,
});

// Grant permissions to use the cross-region inference profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,76 @@ class CrossRegionInferenceProfileError extends Error {
* throughput and resilience during peak demands.
*/
export enum CrossRegionInferenceProfileRegion {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* Global cross-region Inference Identifier.
* Routes requests to any supported commercial AWS Region.
*/
GLOBAL = 'global',
/**
* Cross-region Inference Identifier for the European area.
* According to the model chosen, this might include:
* - Frankfurt (`eu-central-1`)
* - Ireland (`eu-west-1`)
* - Paris (`eu-west-3`)
* - London (`eu-west-2`)
* - Stockholm (`eu-north-1`)
* - Milan (`eu-south-1`)
* - Spain (`eu-south-2`)
* - Zurich (`eu-central-2`)
*/
EU = 'eu',
/**
* Cross-region Inference Identifier for the United States area.
* According to the model chosen, this might include:
* - N. Virginia (`us-east-1`)
* - Oregon (`us-west-2`)
* - Ohio (`us-east-2`)
* - Oregon (`us-west-2`)
*/
US = 'us',
/**
* Cross-region Inference Identifier for the US GovCloud area.
* According to the model chosen, this might include:
* - GovCloud US-East (`us-gov-east-1`)
* - GovCloud US-West (`us-gov-west-1`)
*/
US_GOV = 'us-gov',
/**
* Cross-region Inference Identifier for the Asia-Pacific area.
* According to the model chosen, this might include:
* - Tokyo (`ap-northeast-1`)
* - Seoul (`ap-northeast-2`)
* - Osaka (`ap-northeast-3`)
* - Mumbai (`ap-south-1`)
* - Hyderabad (`ap-south-2`)
* - Singapore (`ap-southeast-1`)
* - Sydney (`ap-southeast-2`)
* - Jakarta (`ap-southeast-3`)
* - Melbourne (`ap-southeast-4`)
* - Malaysia (`ap-southeast-5`)
* - Thailand (`ap-southeast-7`)
* - Taipei (`ap-east-2`)
* - Middle East (UAE) (`me-central-1`)
*/
APAC = 'apac',
/**
* Cross-region Inference Identifier for the Japan area.
* According to the model chosen, this might include:
* - Tokyo (`ap-northeast-1`)
* - Osaka (`ap-northeast-3`)
*/
JP = 'jp',
/**
* Cross-region Inference Identifier for the Australia area.
* According to the model chosen, this might include:
* - Sydney (`ap-southeast-2`)
* - Melbourne (`ap-southeast-4`)
*/
AU = 'au',
}

/**
* Mapping of AWS regions to their corresponding geographic areas for cross-region inference.
* This mapping is used to determine which cross-region inference profile to use based on the current region.
* This mapping is used to determine which cross-region inference profile to use based on the current region in prompt router.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mapping here is used only in the prompt router.
Also, since the current implementation is sufficient for the base models supported by the prompt router, I only changed the docs.

Due to the expansion of cross-region inference grouping, the relationship between regions and groupings has become 1:n. For example, ap-northeast-1 is included in both APAC and JP.

Therefore, if the supported models for the prompt router increases in the future, adjustments to this implementation will likely be necessary.

*/
export const REGION_TO_GEO_AREA: { [key: string]: CrossRegionInferenceProfileRegion } = {
// US Regions
Expand Down
79 changes: 79 additions & 0 deletions packages/@aws-cdk/aws-bedrock-alpha/bedrock/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,85 @@ export class BedrockFoundationModel implements IBedrockInvokable {
* ANTHROPIC
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While there are other insufficient models besides Anthropic, there are too many to cover.
Therefore, I prioritized Claude, which is likely to be the most widely used.

***************************************************************************/

/**
* Anthropic's Claude Haiku 4.5 model, most cost-efficient and fastest.
* Delivers near-frontier performance with substantially lower cost and faster speeds.
*
* Features:
* - Supports vision (Image input modality)
* - Cross-region support
* - Supports Bedrock Agents
* - Best for: Large-scale deployments, budget-conscious applications, real-time customer service, latency-sensitive use cases
*/
Comment on lines +348 to +356
Copy link
Contributor Author

@mazyu36 mazyu36 Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about the extent to which we should describe this section.
I wonder if just mentioning the model name would suffice.

The content is written in the same format as the existing model explanations, based on the content from the following links.

https://aws.amazon.com/bedrock/anthropic/
https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html

public static readonly ANTHROPIC_CLAUDE_HAIKU_4_5_V1_0 = new BedrockFoundationModel(
'anthropic.claude-haiku-4-5-20251001-v1:0',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);

/**
* Anthropic's Claude Sonnet 4.5 model, most intelligent in the Claude 4 series.
* Demonstrates advancements in agent capabilities with enhanced performance in tool handling,
* memory management, and context processing. Excels at autonomous long-horizon coding tasks.
*
* Features:
* - Supports vision (Image input modality)
* - Cross-region support
* - Supports Bedrock Agents
* - Enhanced tool handling and memory management for long-running tasks
* - Best for: Complex agents, coding, autonomous long-horizon tasks, research and analysis, cybersecurity and finance applications
*/
public static readonly ANTHROPIC_CLAUDE_SONNET_4_5_V1_0 = new BedrockFoundationModel(
'anthropic.claude-sonnet-4-5-20250929-v1:0',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);

/**
* Anthropic's Claude Opus 4.1 model, most advanced for coding and agentic applications.
* Excels at independently planning and executing complex development tasks end-to-end.
* Drop-in replacement for Opus 4 with superior performance and precision.
*
* Features:
* - Supports vision (Image input modality)
* - Cross-region support
* - Supports Bedrock Agents
* - Best for: Complex end-to-end development, agentic applications, research, advanced reasoning
*/
public static readonly ANTHROPIC_CLAUDE_OPUS_4_1_V1_0 = new BedrockFoundationModel(
'anthropic.claude-opus-4-1-20250805-v1:0',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);

/**
* Anthropic's Claude Opus 4 model, next-generation frontier model.
* High-performance model for advanced reasoning and complex multi-step tasks.
*
* Features:
* - Supports vision (Image input modality)
* - Cross-region support
* - Supports Bedrock Agents
* - Best for: Advanced reasoning, complex workflows, enterprise applications
*/
public static readonly ANTHROPIC_CLAUDE_OPUS_4_V1_0 = new BedrockFoundationModel(
'anthropic.claude-opus-4-20250514-v1:0',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);

/**
* Anthropic's Claude Sonnet 4 model, next-generation frontier model.
* Advanced model with improved performance for production environments.
* Balances quality, cost-effectiveness, and responsiveness.
*
* Features:
* - Supports vision (Image input modality)
* - Cross-region support
* - Supports Bedrock Agents
* - Best for: Production applications, complex language tasks, balanced performance and cost
*/
public static readonly ANTHROPIC_CLAUDE_SONNET_4_V1_0 = new BedrockFoundationModel(
'anthropic.claude-sonnet-4-20250514-v1:0',
{ supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true },
);

/**
* Anthropic's Claude 3.7 Sonnet model, latest in the Claude 3 series.
* Advanced language model with enhanced capabilities.
Expand Down
Loading