# WebFunctionTraffic

How a WebFunction endpoint splits its traffic between revisions.

- Source: [`aws-lambda/lib/webfunction-endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/aws-lambda/lib/webfunction-endpoint.ts#L218)
- Type last changed: v2.276.0 · 10 Nov 2026

## 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';
const webFunctionTraffic = lambda.WebFunctionTraffic.single('revisionId');
```

## Methods

- `single(revisionId: string): WebFunctionTraffic // chainable` (static) — Send all of the endpoint's traffic to one revision.

  **Parameters**

  - `revisionId` — the ID of the revision.
