generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructsDocs


@cdklabs/generative-ai-cdk-constructs / bedrock / CrossRegionInferenceProfile

Class: CrossRegionInferenceProfile

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.

See

https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html

Implements

Properties

inferenceProfileArn

readonly inferenceProfileArn: string

Example

'arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-3-5-sonnet-20240620-v1:0'

Implementation of

IInferenceProfile.inferenceProfileArn


inferenceProfileId

readonly inferenceProfileId: string

Example

'us.anthropic.claude-3-5-sonnet-20240620-v1:0'

Implementation of

IInferenceProfile.inferenceProfileId


inferenceProfileModel

readonly inferenceProfileModel: BedrockFoundationModel

The underlying model supporting cross-region inference.


invokableArn

readonly invokableArn: string

This equals to the inferenceProfileArn property, useful just to implement IInvokable interface

Implementation of

IInvokable.invokableArn


type

readonly type: InferenceProfileType

Example

InferenceProfileType.SYSTEM_DEFINED

Implementation of

IInferenceProfile.type

Methods

grantInvoke()

grantInvoke(grantee): Grant

Gives the appropriate policies to invoke and use the Foundation Model.

Parameters

grantee: IGrantable

Returns

Grant

Implementation of

IInvokable.grantInvoke


grantProfileUsage()

grantProfileUsage(grantee): Grant

Grants appropriate permissions to use the cross-region inference profile. Does not grant permissions to use the model in the profile.

Parameters

grantee: IGrantable

Returns

Grant

Implementation of

IInferenceProfile.grantProfileUsage


fromConfig()

static fromConfig(config): CrossRegionInferenceProfile

Parameters

config: CrossRegionInferenceProfileProps

Returns

CrossRegionInferenceProfile