AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

SubscriptionFilter

A new Subscription on a CloudWatch log group.

Import

import { SubscriptionFilter } from 'aws-cdk-lib/aws-logs';

Or use the module namespace:

import * as logs from 'aws-cdk-lib/aws-logs';
// logs.SubscriptionFilter

Properties

Configuration passed to the constructor as SubscriptionFilterProps.

logGroupRequired
ILogGroupRef

The log group to create the subscription on.

4 properties inherited from SubscriptionFilterOptions
destinationRequiredinherited from SubscriptionFilterOptions
ILogSubscriptionDestination

The destination to send the filtered events to. For example, a Kinesis stream or a Lambda function.

filterPatternRequiredinherited from SubscriptionFilterOptions
IFilterPattern

Log events matching this pattern will be sent to the destination.

distributionOptionalinherited from SubscriptionFilterOptions
Distribution

The method used to distribute log data to the destination. This property can only be used with KinesisDestination.

Default: Distribution.BY_LOG_STREAM

filterNameOptionalinherited from SubscriptionFilterOptions
string

The name of the subscription filter.

Default: Automatically generated

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter