# VersionWeight

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

- Source: [`aws-lambda/lib/alias.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda/lib/alias.ts#L332)

## Example

```ts
// 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

- `version`: [IVersion](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IVersion.html) (required) — The version to route traffic to.

- `weight`: number (required) — How much weight to assign to this version (0..1).
