class CrossRegionInferenceProfile
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Alpha.CrossRegionInferenceProfile |
Go | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#CrossRegionInferenceProfile |
Java | software.amazon.awscdk.services.bedrock.alpha.CrossRegionInferenceProfile |
Python | aws_cdk.aws_bedrock_alpha.CrossRegionInferenceProfile |
TypeScript (source) | @aws-cdk/aws-bedrock-alpha ยป CrossRegionInferenceProfile |
Implements
IBedrock, IInference
Cross-region inference enables you to seamlessly manage unplanned traffic bursts by utilizing compute across different AWS Regions.
With cross-region inference, you can distribute traffic across multiple AWS Regions, enabling higher throughput and enhanced resilience during periods of peak demands.
This construct represents a system-defined inference profile that routes requests across multiple regions based on availability and demand.
Example
// Create a cross-region inference profile
const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
});
// Use the cross-region profile with an agent
const agent = new bedrock.Agent(this, 'Agent', {
foundationModel: crossRegionProfile,
instruction: 'You are a helpful and friendly agent that answers questions about agriculture.',
});
Properties
| Name | Type | Description |
|---|---|---|
| inference | string | The ARN of the inference profile. |
| inference | string | The unique identifier of the inference profile. |
| inference | Bedrock | The underlying foundation model supporting cross-region inference. |
| invokable | string | The ARN used for invoking this inference profile. |
| type | Inference | The type of inference profile. |
inferenceProfileArn
Type:
string
The ARN of the inference profile.
inferenceProfileId
Type:
string
The unique identifier of the inference profile.
Format: {geoRegion}.{modelId}
inferenceProfileModel
Type:
Bedrock
The underlying foundation model supporting cross-region inference.
invokableArn
Type:
string
The ARN used for invoking this inference profile.
This equals to the inferenceProfileArn property, useful for implementing IBedrockInvokable interface.
type
Type:
Inference
The type of inference profile.
Always SYSTEM_DEFINED for cross-region profiles.
Methods
| Name | Description |
|---|---|
| grant | Gives the appropriate policies to invoke and use the Foundation Model. |
| grant | Grants appropriate permissions to use the cross-region inference profile. |
| static from | Creates a Cross-Region Inference Profile from the provided configuration. |
grantInvoke(grantee)
public grantInvoke(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ - The IAM principal to grant permissions to.
Returns
Gives the appropriate policies to invoke and use the Foundation Model.
For cross-region inference profiles, this method grants permissions to:
- Invoke the model in all regions where the inference profile can route requests
- Use the inference profile itself
grantProfileUsage(grantee)
public grantProfileUsage(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ - The IAM principal to grant permissions to.
Returns
Grants appropriate permissions to use the cross-region inference profile.
This method adds the necessary IAM permissions to allow the grantee to:
- Get inference profile details (bedrock:GetInferenceProfile)
- Invoke the model through the inference profile (bedrock:InvokeModel*)
Note: This does not grant permissions to use the underlying model directly. For comprehensive permissions, use grantInvoke() instead.
static fromConfig(config)
public static fromConfig(config: CrossRegionInferenceProfileProps): CrossRegionInferenceProfile
Parameters
- config
Crossโ - Configuration for the cross-region inference profile.Region Inference Profile Props
Returns
Creates a Cross-Region Inference Profile from the provided configuration.

.NET
Go
Java
Python
TypeScript (