Class CrossRegionInferenceProfile

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.CrossRegionInferenceProfile
All Implemented Interfaces:
IBedrockInvokable, IInferenceProfile, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-06T18:14:48.057Z") @Stability(Experimental) public class CrossRegionInferenceProfile extends software.amazon.jsii.JsiiObject implements IBedrockInvokable, IInferenceProfile
(experimental) 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
 CrossRegionInferenceProfile crossRegionProfile = CrossRegionInferenceProfile.fromConfig(CrossRegionInferenceProfileProps.builder()
         .geoRegion(CrossRegionInferenceProfileRegion.US)
         .model(BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V2_0)
         .build());
 // Create an application inference profile across regions
 ApplicationInferenceProfile appProfile = ApplicationInferenceProfile.Builder.create(this, "MyMultiRegionProfile")
         .applicationInferenceProfileName("claude-35-sonnet-v2-multi-region")
         .modelSource(crossRegionProfile)
         .description("Multi-region application profile for cost tracking")
         .build();
 

See Also:
  • Constructor Details

    • CrossRegionInferenceProfile

      protected CrossRegionInferenceProfile(software.amazon.jsii.JsiiObjectRef objRef)
    • CrossRegionInferenceProfile

      protected CrossRegionInferenceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • fromConfig

      @Stability(Experimental) @NotNull public static CrossRegionInferenceProfile fromConfig(@NotNull CrossRegionInferenceProfileProps config)
      (experimental) Creates a Cross-Region Inference Profile from the provided configuration.

      Parameters:
      config -
      • Configuration for the cross-region inference profile.
      This parameter is required.
      Returns:
      A new CrossRegionInferenceProfile instance
    • grantInvoke

      @Stability(Experimental) @NotNull public Grant grantInvoke(@NotNull IGrantable grantee)
      (experimental) 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

      Specified by:
      grantInvoke in interface IBedrockInvokable
      Parameters:
      grantee -
      • The IAM principal to grant permissions to.
      This parameter is required.
      Returns:
      An IAM Grant object representing the granted permissions
    • grantProfileUsage

      @Stability(Experimental) @NotNull public Grant grantProfileUsage(@NotNull IGrantable grantee)
      (experimental) 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.

      Specified by:
      grantProfileUsage in interface IInferenceProfile
      Parameters:
      grantee -
      • The IAM principal to grant permissions to.
      This parameter is required.
      Returns:
      An IAM Grant object representing the granted permissions
    • getInferenceProfileArn

      @Stability(Experimental) @NotNull public String getInferenceProfileArn()
      (experimental) The ARN of the inference profile.
      Specified by:
      getInferenceProfileArn in interface IInferenceProfile
    • getInferenceProfileId

      @Stability(Experimental) @NotNull public String getInferenceProfileId()
      (experimental) The unique identifier of the inference profile.

      Format: {geoRegion}.{modelId}

      Specified by:
      getInferenceProfileId in interface IInferenceProfile
    • getInferenceProfileModel

      @Stability(Experimental) @NotNull public BedrockFoundationModel getInferenceProfileModel()
      (experimental) The underlying foundation model supporting cross-region inference.
    • getInvokableArn

      @Stability(Experimental) @NotNull public String getInvokableArn()
      (experimental) The ARN used for invoking this inference profile.

      This equals to the inferenceProfileArn property, useful for implementing IBedrockInvokable interface.

      Specified by:
      getInvokableArn in interface IBedrockInvokable
    • getType

      @Stability(Experimental) @NotNull public InferenceProfileType getType()
      (experimental) The type of inference profile.

      Always SYSTEM_DEFINED for cross-region profiles.

      Specified by:
      getType in interface IInferenceProfile