enum Distribution
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Logs.Distribution |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#Distribution |
Java | software.amazon.awscdk.services.logs.Distribution |
Python | aws_cdk.aws_logs.Distribution |
TypeScript (source) | aws-cdk-lib » aws_logs » Distribution |
The method used to distribute log data to the destination.
Example
import * as destinations from 'aws-cdk-lib/aws-logs-destinations';
import * as kinesis from 'aws-cdk-lib/aws-kinesis';
declare const stream: kinesis.Stream;
declare const logGroup: logs.LogGroup;
new logs.SubscriptionFilter(this, 'Subscription', {
logGroup,
destination: new destinations.KinesisDestination(stream),
filterPattern: logs.FilterPattern.allTerms("ERROR", "MainThread"),
filterName: 'ErrorInMainThread',
distribution: logs.Distribution.RANDOM,
});
Members
| Name | Description |
|---|---|
| BY_LOG_STREAM | Log events from the same log stream are kept together and sent to the same destination. |
| RANDOM | Log events are distributed across the log destinations randomly. |
BY_LOG_STREAM
Log events from the same log stream are kept together and sent to the same destination.
RANDOM
Log events are distributed across the log destinations randomly.

.NET
Go
Java
Python
TypeScript (