1. Packages
  2. AWS
  3. API Docs
  4. cloudwatch
  5. LogSubscriptionFilter
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Provides a CloudWatch Logs subscription filter resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const testLambdafunctionLogfilter = new aws.cloudwatch.LogSubscriptionFilter("test_lambdafunction_logfilter", {
        name: "test_lambdafunction_logfilter",
        roleArn: iamForLambda.arn,
        logGroup: "/aws/lambda/example_lambda_name",
        filterPattern: "logtype test",
        destinationArn: testLogstream.arn,
        distribution: "Random",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test_lambdafunction_logfilter = aws.cloudwatch.LogSubscriptionFilter("test_lambdafunction_logfilter",
        name="test_lambdafunction_logfilter",
        role_arn=iam_for_lambda["arn"],
        log_group="/aws/lambda/example_lambda_name",
        filter_pattern="logtype test",
        destination_arn=test_logstream["arn"],
        distribution="Random")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudwatch.NewLogSubscriptionFilter(ctx, "test_lambdafunction_logfilter", &cloudwatch.LogSubscriptionFilterArgs{
    			Name:           pulumi.String("test_lambdafunction_logfilter"),
    			RoleArn:        pulumi.Any(iamForLambda.Arn),
    			LogGroup:       pulumi.Any("/aws/lambda/example_lambda_name"),
    			FilterPattern:  pulumi.String("logtype test"),
    			DestinationArn: pulumi.Any(testLogstream.Arn),
    			Distribution:   pulumi.String("Random"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var testLambdafunctionLogfilter = new Aws.CloudWatch.LogSubscriptionFilter("test_lambdafunction_logfilter", new()
        {
            Name = "test_lambdafunction_logfilter",
            RoleArn = iamForLambda.Arn,
            LogGroup = "/aws/lambda/example_lambda_name",
            FilterPattern = "logtype test",
            DestinationArn = testLogstream.Arn,
            Distribution = "Random",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cloudwatch.LogSubscriptionFilter;
    import com.pulumi.aws.cloudwatch.LogSubscriptionFilterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testLambdafunctionLogfilter = new LogSubscriptionFilter("testLambdafunctionLogfilter", LogSubscriptionFilterArgs.builder()
                .name("test_lambdafunction_logfilter")
                .roleArn(iamForLambda.arn())
                .logGroup("/aws/lambda/example_lambda_name")
                .filterPattern("logtype test")
                .destinationArn(testLogstream.arn())
                .distribution("Random")
                .build());
    
        }
    }
    
    resources:
      testLambdafunctionLogfilter:
        type: aws:cloudwatch:LogSubscriptionFilter
        name: test_lambdafunction_logfilter
        properties:
          name: test_lambdafunction_logfilter
          roleArn: ${iamForLambda.arn}
          logGroup: /aws/lambda/example_lambda_name
          filterPattern: logtype test
          destinationArn: ${testLogstream.arn}
          distribution: Random
    

    Create LogSubscriptionFilter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LogSubscriptionFilter(name: string, args: LogSubscriptionFilterArgs, opts?: CustomResourceOptions);
    @overload
    def LogSubscriptionFilter(resource_name: str,
                              args: LogSubscriptionFilterArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogSubscriptionFilter(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              destination_arn: Optional[str] = None,
                              filter_pattern: Optional[str] = None,
                              log_group: Optional[str] = None,
                              apply_on_transformed_logs: Optional[bool] = None,
                              distribution: Optional[str] = None,
                              emit_system_fields: Optional[Sequence[str]] = None,
                              name: Optional[str] = None,
                              region: Optional[str] = None,
                              role_arn: Optional[str] = None)
    func NewLogSubscriptionFilter(ctx *Context, name string, args LogSubscriptionFilterArgs, opts ...ResourceOption) (*LogSubscriptionFilter, error)
    public LogSubscriptionFilter(string name, LogSubscriptionFilterArgs args, CustomResourceOptions? opts = null)
    public LogSubscriptionFilter(String name, LogSubscriptionFilterArgs args)
    public LogSubscriptionFilter(String name, LogSubscriptionFilterArgs args, CustomResourceOptions options)
    
    type: aws:cloudwatch:LogSubscriptionFilter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LogSubscriptionFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LogSubscriptionFilterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LogSubscriptionFilterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogSubscriptionFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogSubscriptionFilterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var logSubscriptionFilterResource = new Aws.CloudWatch.LogSubscriptionFilter("logSubscriptionFilterResource", new()
    {
        DestinationArn = "string",
        FilterPattern = "string",
        LogGroup = "string",
        ApplyOnTransformedLogs = false,
        Distribution = "string",
        EmitSystemFields = new[]
        {
            "string",
        },
        Name = "string",
        Region = "string",
        RoleArn = "string",
    });
    
    example, err := cloudwatch.NewLogSubscriptionFilter(ctx, "logSubscriptionFilterResource", &cloudwatch.LogSubscriptionFilterArgs{
    	DestinationArn:         pulumi.String("string"),
    	FilterPattern:          pulumi.String("string"),
    	LogGroup:               pulumi.Any("string"),
    	ApplyOnTransformedLogs: pulumi.Bool(false),
    	Distribution:           pulumi.String("string"),
    	EmitSystemFields: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Region:  pulumi.String("string"),
    	RoleArn: pulumi.String("string"),
    })
    
    var logSubscriptionFilterResource = new LogSubscriptionFilter("logSubscriptionFilterResource", LogSubscriptionFilterArgs.builder()
        .destinationArn("string")
        .filterPattern("string")
        .logGroup("string")
        .applyOnTransformedLogs(false)
        .distribution("string")
        .emitSystemFields("string")
        .name("string")
        .region("string")
        .roleArn("string")
        .build());
    
    log_subscription_filter_resource = aws.cloudwatch.LogSubscriptionFilter("logSubscriptionFilterResource",
        destination_arn="string",
        filter_pattern="string",
        log_group="string",
        apply_on_transformed_logs=False,
        distribution="string",
        emit_system_fields=["string"],
        name="string",
        region="string",
        role_arn="string")
    
    const logSubscriptionFilterResource = new aws.cloudwatch.LogSubscriptionFilter("logSubscriptionFilterResource", {
        destinationArn: "string",
        filterPattern: "string",
        logGroup: "string",
        applyOnTransformedLogs: false,
        distribution: "string",
        emitSystemFields: ["string"],
        name: "string",
        region: "string",
        roleArn: "string",
    });
    
    type: aws:cloudwatch:LogSubscriptionFilter
    properties:
        applyOnTransformedLogs: false
        destinationArn: string
        distribution: string
        emitSystemFields:
            - string
        filterPattern: string
        logGroup: string
        name: string
        region: string
        roleArn: string
    

    LogSubscriptionFilter Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LogSubscriptionFilter resource accepts the following input properties:

    DestinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    FilterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    LogGroup string | string
    Name of the log group to associate the subscription filter with.
    ApplyOnTransformedLogs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    Distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    EmitSystemFields List<string>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    Name string
    Name for the subscription filter.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    DestinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    FilterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    LogGroup string | string
    Name of the log group to associate the subscription filter with.
    ApplyOnTransformedLogs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    Distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    EmitSystemFields []string
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    Name string
    Name for the subscription filter.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    destinationArn String
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    filterPattern String
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup String | String
    Name of the log group to associate the subscription filter with.
    applyOnTransformedLogs Boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    distribution String
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields List<String>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    name String
    Name for the subscription filter.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    destinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    filterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup string | LogGroup
    Name of the log group to associate the subscription filter with.
    applyOnTransformedLogs boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields string[]
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    name string
    Name for the subscription filter.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    destination_arn str
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    filter_pattern str
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    log_group str | str
    Name of the log group to associate the subscription filter with.
    apply_on_transformed_logs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    distribution str
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emit_system_fields Sequence[str]
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    name str
    Name for the subscription filter.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_arn str
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    destinationArn String
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    filterPattern String
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup String |
    Name of the log group to associate the subscription filter with.
    applyOnTransformedLogs Boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    distribution String
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields List<String>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    name String
    Name for the subscription filter.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LogSubscriptionFilter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LogSubscriptionFilter Resource

    Get an existing LogSubscriptionFilter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LogSubscriptionFilterState, opts?: CustomResourceOptions): LogSubscriptionFilter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apply_on_transformed_logs: Optional[bool] = None,
            destination_arn: Optional[str] = None,
            distribution: Optional[str] = None,
            emit_system_fields: Optional[Sequence[str]] = None,
            filter_pattern: Optional[str] = None,
            log_group: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            role_arn: Optional[str] = None) -> LogSubscriptionFilter
    func GetLogSubscriptionFilter(ctx *Context, name string, id IDInput, state *LogSubscriptionFilterState, opts ...ResourceOption) (*LogSubscriptionFilter, error)
    public static LogSubscriptionFilter Get(string name, Input<string> id, LogSubscriptionFilterState? state, CustomResourceOptions? opts = null)
    public static LogSubscriptionFilter get(String name, Output<String> id, LogSubscriptionFilterState state, CustomResourceOptions options)
    resources:  _:    type: aws:cloudwatch:LogSubscriptionFilter    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplyOnTransformedLogs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    DestinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    Distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    EmitSystemFields List<string>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    FilterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    LogGroup string | string
    Name of the log group to associate the subscription filter with.
    Name string
    Name for the subscription filter.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    ApplyOnTransformedLogs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    DestinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    Distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    EmitSystemFields []string
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    FilterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    LogGroup string | string
    Name of the log group to associate the subscription filter with.
    Name string
    Name for the subscription filter.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    applyOnTransformedLogs Boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    destinationArn String
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    distribution String
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields List<String>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    filterPattern String
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup String | String
    Name of the log group to associate the subscription filter with.
    name String
    Name for the subscription filter.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    applyOnTransformedLogs boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    destinationArn string
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    distribution string
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields string[]
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    filterPattern string
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup string | LogGroup
    Name of the log group to associate the subscription filter with.
    name string
    Name for the subscription filter.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn string
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    apply_on_transformed_logs bool
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    destination_arn str
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    distribution str
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emit_system_fields Sequence[str]
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    filter_pattern str
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    log_group str | str
    Name of the log group to associate the subscription filter with.
    name str
    Name for the subscription filter.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_arn str
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.
    applyOnTransformedLogs Boolean
    Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to false. Valid only for log groups that have an active log transformer.
    destinationArn String
    ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN.
    distribution String
    Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream".
    emitSystemFields List<String>
    List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: "@aws.account", "@aws.region". To remove this argument after it has been set, specify an empty list [] explicitly to avoid perpetual differences.
    filterPattern String
    Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string "" to match everything. For more information, see the Amazon CloudWatch Logs User Guide.
    logGroup String |
    Name of the log group to associate the subscription filter with.
    name String
    Name for the subscription filter.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use aws.lambda.Permission resource for granting access from CloudWatch logs to the destination Lambda function.

    Import

    Using pulumi import, import CloudWatch Logs subscription filter using the log group name and subscription filter name separated by |. For example:

    $ pulumi import aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter test_lambdafunction_logfilter "/aws/lambda/example_lambda_name|test_lambdafunction_logfilter"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate