aws-cdk-lib.aws_lambda.VersionWeight

interface VersionWeight

LanguageType name
.NETAmazon.CDK.AWS.Lambda.VersionWeight
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#VersionWeight
Javasoftware.amazon.awscdk.services.lambda.VersionWeight
Pythonaws_cdk.aws_lambda.VersionWeight
TypeScript (source)aws-cdk-lib » aws_lambda » VersionWeight

A version/weight pair for routing traffic to Lambda functions.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';

declare const version: lambda.Version;
const versionWeight: lambda.VersionWeight = {
  version: version,
  weight: 123,
};

Properties

NameTypeDescription
versionIVersionThe version to route traffic to.
weightnumberHow much weight to assign to this version (0..1).

version

Type: IVersion

The version to route traffic to.


weight

Type: number

How much weight to assign to this version (0..1).