# SubscriptionFilterProps

Properties for a SubscriptionFilter.

Extends: SubscriptionFilterProps
Extends: SubscriptionFilterOptions
Used as props by: SubscriptionFilter

- Source: [`aws-logs/lib/subscription-filter.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-logs/lib/subscription-filter.ts#L49)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
import * as destinations from 'aws-cdk-lib/aws-logs-destinations';

declare const fn: lambda.Function;
declare const logGroup: logs.LogGroup;

new logs.SubscriptionFilter(this, 'Subscription', {
  logGroup,
  destination: new destinations.LambdaDestination(fn),
  filterPattern: logs.FilterPattern.allTerms("ERROR", "MainThread"),
  filterName: 'ErrorInMainThread',
});
```

## Properties

- `destination`: [ILogSubscriptionDestination](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogSubscriptionDestination.html) (required) — The destination to send the filtered events to.

  For example, a Kinesis stream or a Lambda function.

- `distribution`: [Distribution](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.Distribution.html) = Distribution.BY_LOG_STREAM — The method used to distribute log data to the destination.

  This property can only be used with KinesisDestination.

- `filterName`: string — The name of the subscription filter.

  **Default:** Automatically generated

- `filterPattern`: [IFilterPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.IFilterPattern.html) (required) — Log events matching this pattern will be sent to the destination.

- `logGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) (required) — The log group to create the subscription on.
