1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. logs
  6. MetricFilter

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi

    The AWS::Logs::MetricFilter resource specifies a metric filter that describes how CWL extracts information from logs and transforms it into Amazon CloudWatch metrics. If you have multiple metric filters that are associated with a log group, all the filters are applied to the log streams in that group. The maximum number of metric filters that can be associated with a log group is 100.

    Create MetricFilter Resource

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

    Constructor syntax

    new MetricFilter(name: string, args: MetricFilterArgs, opts?: CustomResourceOptions);
    @overload
    def MetricFilter(resource_name: str,
                     args: MetricFilterArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricFilter(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     filter_pattern: Optional[str] = None,
                     log_group_name: Optional[str] = None,
                     metric_transformations: Optional[Sequence[MetricFilterMetricTransformationArgs]] = None,
                     apply_on_transformed_logs: Optional[bool] = None,
                     emit_system_field_dimensions: Optional[Sequence[str]] = None,
                     field_selection_criteria: Optional[str] = None,
                     filter_name: Optional[str] = None)
    func NewMetricFilter(ctx *Context, name string, args MetricFilterArgs, opts ...ResourceOption) (*MetricFilter, error)
    public MetricFilter(string name, MetricFilterArgs args, CustomResourceOptions? opts = null)
    public MetricFilter(String name, MetricFilterArgs args)
    public MetricFilter(String name, MetricFilterArgs args, CustomResourceOptions options)
    
    type: aws-native:logs:MetricFilter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_logs_metric_filter" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args MetricFilterArgs
    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 MetricFilterArgs
    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 MetricFilterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricFilterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MetricFilter 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 MetricFilter resource accepts the following input properties:

    FilterPattern string
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    LogGroupName string
    The name of an existing log group that you want to associate with this metric filter.
    MetricTransformations List<Pulumi.AwsNative.Logs.Inputs.MetricFilterMetricTransformation>
    The metric transformations.
    ApplyOnTransformedLogs bool
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    EmitSystemFieldDimensions List<string>
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    FieldSelectionCriteria string
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    FilterName string
    The name of the metric filter.
    FilterPattern string
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    LogGroupName string
    The name of an existing log group that you want to associate with this metric filter.
    MetricTransformations []MetricFilterMetricTransformationArgs
    The metric transformations.
    ApplyOnTransformedLogs bool
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    EmitSystemFieldDimensions []string
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    FieldSelectionCriteria string
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    FilterName string
    The name of the metric filter.
    filter_pattern string
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    log_group_name string
    The name of an existing log group that you want to associate with this metric filter.
    metric_transformations list(object)
    The metric transformations.
    apply_on_transformed_logs bool
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    emit_system_field_dimensions list(string)
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    field_selection_criteria string
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    filter_name string
    The name of the metric filter.
    filterPattern String
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    logGroupName String
    The name of an existing log group that you want to associate with this metric filter.
    metricTransformations List<MetricFilterMetricTransformation>
    The metric transformations.
    applyOnTransformedLogs Boolean
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    emitSystemFieldDimensions List<String>
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    fieldSelectionCriteria String
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    filterName String
    The name of the metric filter.
    filterPattern string
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    logGroupName string
    The name of an existing log group that you want to associate with this metric filter.
    metricTransformations MetricFilterMetricTransformation[]
    The metric transformations.
    applyOnTransformedLogs boolean
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    emitSystemFieldDimensions string[]
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    fieldSelectionCriteria string
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    filterName string
    The name of the metric filter.
    filter_pattern str
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    log_group_name str
    The name of an existing log group that you want to associate with this metric filter.
    metric_transformations Sequence[MetricFilterMetricTransformationArgs]
    The metric transformations.
    apply_on_transformed_logs bool
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    emit_system_field_dimensions Sequence[str]
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    field_selection_criteria str
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    filter_name str
    The name of the metric filter.
    filterPattern String
    A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax.
    logGroupName String
    The name of an existing log group that you want to associate with this metric filter.
    metricTransformations List<Property Map>
    The metric transformations.
    applyOnTransformedLogs Boolean
    This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.
    emitSystemFieldDimensions List<String>
    The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the emitSystemFieldDimensions value if it was specified when the metric filter was created.
    fieldSelectionCriteria String
    The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the metric filter was created.
    filterName String
    The name of the metric filter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MetricFilter 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 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 MetricFilter Resource

    Get an existing MetricFilter 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>, opts?: CustomResourceOptions): MetricFilter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> MetricFilter
    func GetMetricFilter(ctx *Context, name string, id IDInput, state *MetricFilterState, opts ...ResourceOption) (*MetricFilter, error)
    public static MetricFilter Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static MetricFilter get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingMetricFilter:    type: aws-native:logs:MetricFilter    get:      id: ${id}
    import {
      to = aws-native_logs_metric_filter.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state MetricFilterState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    MetricFilterDimension, MetricFilterDimensionArgs

    Specifies the CW metric dimensions to publish with this metric. Because dimensions are part of the unique identifier for a metric, whenever a unique dimension name/value pair is extracted from your logs, you are creating a new variation of that metric. For more information about publishing dimensions with metrics created by metric filters, see Publishing dimensions with metrics from values in JSON or space-delimited log events. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.

    Key string
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    Value string
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    Key string
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    Value string
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    key string
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    value string
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    key String
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    value String
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    key string
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    value string
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    key str
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    value str
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.
    key String
    The name for the CW metric dimension that the metric filter creates. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).
    value String
    The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, $.eventType for JSON log events, or $server for space-delimited log events.

    MetricFilterMetricTransformation, MetricFilterMetricTransformationArgs

    MetricTransformation is a property of the AWS::Logs::MetricFilter resource that describes how to transform log streams into a CloudWatch metric.

    MetricName string
    The name of the CloudWatch metric.
    MetricNamespace string
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    MetricValue string
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    DefaultValue double
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    Dimensions List<Pulumi.AwsNative.Logs.Inputs.MetricFilterDimension>
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    Unit Pulumi.AwsNative.Logs.MetricFilterMetricTransformationUnit
    The unit to assign to the metric. If you omit this, the unit is set as None.
    MetricName string
    The name of the CloudWatch metric.
    MetricNamespace string
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    MetricValue string
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    DefaultValue float64
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    Dimensions []MetricFilterDimension
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    Unit MetricFilterMetricTransformationUnit
    The unit to assign to the metric. If you omit this, the unit is set as None.
    metric_name string
    The name of the CloudWatch metric.
    metric_namespace string
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    metric_value string
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    default_value number
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    dimensions list(object)
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    unit "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" | "Kilobytes" | "Megabytes" | "Gigabytes" | "Terabytes" | "Bits" | "Kilobits" | "Megabits" | "Gigabits" | "Terabits" | "Percent" | "Count" | "Bytes/Second" | "Kilobytes/Second" | "Megabytes/Second" | "Gigabytes/Second" | "Terabytes/Second" | "Bits/Second" | "Kilobits/Second" | "Megabits/Second" | "Gigabits/Second" | "Terabits/Second" | "Count/Second" | "None"
    The unit to assign to the metric. If you omit this, the unit is set as None.
    metricName String
    The name of the CloudWatch metric.
    metricNamespace String
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    metricValue String
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    defaultValue Double
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    dimensions List<MetricFilterDimension>
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    unit MetricFilterMetricTransformationUnit
    The unit to assign to the metric. If you omit this, the unit is set as None.
    metricName string
    The name of the CloudWatch metric.
    metricNamespace string
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    metricValue string
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    defaultValue number
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    dimensions MetricFilterDimension[]
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    unit MetricFilterMetricTransformationUnit
    The unit to assign to the metric. If you omit this, the unit is set as None.
    metric_name str
    The name of the CloudWatch metric.
    metric_namespace str
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    metric_value str
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    default_value float
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    dimensions Sequence[MetricFilterDimension]
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    unit MetricFilterMetricTransformationUnit
    The unit to assign to the metric. If you omit this, the unit is set as None.
    metricName String
    The name of the CloudWatch metric.
    metricNamespace String
    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
    metricValue String
    The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as $.size.
    defaultValue Number
    (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
    dimensions List<Property Map>
    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Charges.
    unit "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" | "Kilobytes" | "Megabytes" | "Gigabytes" | "Terabytes" | "Bits" | "Kilobits" | "Megabits" | "Gigabits" | "Terabits" | "Percent" | "Count" | "Bytes/Second" | "Kilobytes/Second" | "Megabytes/Second" | "Gigabytes/Second" | "Terabytes/Second" | "Bits/Second" | "Kilobits/Second" | "Megabits/Second" | "Gigabits/Second" | "Terabits/Second" | "Count/Second" | "None"
    The unit to assign to the metric. If you omit this, the unit is set as None.

    MetricFilterMetricTransformationUnit

    The unit to assign to the metric. If you omit this, the unit is set as None.

    NameValue
    SecondsSeconds
    MicrosecondsMicroseconds
    MillisecondsMilliseconds
    BytesBytes
    KilobytesKilobytes
    MegabytesMegabytes
    GigabytesGigabytes
    TerabytesTerabytes
    BitsBits
    KilobitsKilobits
    MegabitsMegabits
    GigabitsGigabits
    TerabitsTerabits
    PercentPercent
    CountCount
    BytesSecondBytes/Second
    KilobytesSecondKilobytes/Second
    MegabytesSecondMegabytes/Second
    GigabytesSecondGigabytes/Second
    TerabytesSecondTerabytes/Second
    BitsSecondBits/Second
    KilobitsSecondKilobits/Second
    MegabitsSecondMegabits/Second
    GigabitsSecondGigabits/Second
    TerabitsSecondTerabits/Second
    CountSecondCount/Second
    NoneNone
    NameValue
    MetricFilterMetricTransformationUnitSecondsSeconds
    MetricFilterMetricTransformationUnitMicrosecondsMicroseconds
    MetricFilterMetricTransformationUnitMillisecondsMilliseconds
    MetricFilterMetricTransformationUnitBytesBytes
    MetricFilterMetricTransformationUnitKilobytesKilobytes
    MetricFilterMetricTransformationUnitMegabytesMegabytes
    MetricFilterMetricTransformationUnitGigabytesGigabytes
    MetricFilterMetricTransformationUnitTerabytesTerabytes
    MetricFilterMetricTransformationUnitBitsBits
    MetricFilterMetricTransformationUnitKilobitsKilobits
    MetricFilterMetricTransformationUnitMegabitsMegabits
    MetricFilterMetricTransformationUnitGigabitsGigabits
    MetricFilterMetricTransformationUnitTerabitsTerabits
    MetricFilterMetricTransformationUnitPercentPercent
    MetricFilterMetricTransformationUnitCountCount
    MetricFilterMetricTransformationUnitBytesSecondBytes/Second
    MetricFilterMetricTransformationUnitKilobytesSecondKilobytes/Second
    MetricFilterMetricTransformationUnitMegabytesSecondMegabytes/Second
    MetricFilterMetricTransformationUnitGigabytesSecondGigabytes/Second
    MetricFilterMetricTransformationUnitTerabytesSecondTerabytes/Second
    MetricFilterMetricTransformationUnitBitsSecondBits/Second
    MetricFilterMetricTransformationUnitKilobitsSecondKilobits/Second
    MetricFilterMetricTransformationUnitMegabitsSecondMegabits/Second
    MetricFilterMetricTransformationUnitGigabitsSecondGigabits/Second
    MetricFilterMetricTransformationUnitTerabitsSecondTerabits/Second
    MetricFilterMetricTransformationUnitCountSecondCount/Second
    MetricFilterMetricTransformationUnitNoneNone
    Value
    Seconds
    Microseconds
    Milliseconds
    Bytes
    Kilobytes
    Megabytes
    Gigabytes
    Terabytes
    Bits
    Kilobits
    Megabits
    Gigabits
    Terabits
    Percent
    Count
    Bytes/Second
    Kilobytes/Second
    Megabytes/Second
    Gigabytes/Second
    Terabytes/Second
    Bits/Second
    Kilobits/Second
    Megabits/Second
    Gigabits/Second
    Terabits/Second
    Count/Second
    None
    NameValue
    SecondsSeconds
    MicrosecondsMicroseconds
    MillisecondsMilliseconds
    BytesBytes
    KilobytesKilobytes
    MegabytesMegabytes
    GigabytesGigabytes
    TerabytesTerabytes
    BitsBits
    KilobitsKilobits
    MegabitsMegabits
    GigabitsGigabits
    TerabitsTerabits
    PercentPercent
    CountCount
    BytesSecondBytes/Second
    KilobytesSecondKilobytes/Second
    MegabytesSecondMegabytes/Second
    GigabytesSecondGigabytes/Second
    TerabytesSecondTerabytes/Second
    BitsSecondBits/Second
    KilobitsSecondKilobits/Second
    MegabitsSecondMegabits/Second
    GigabitsSecondGigabits/Second
    TerabitsSecondTerabits/Second
    CountSecondCount/Second
    NoneNone
    NameValue
    SecondsSeconds
    MicrosecondsMicroseconds
    MillisecondsMilliseconds
    BytesBytes
    KilobytesKilobytes
    MegabytesMegabytes
    GigabytesGigabytes
    TerabytesTerabytes
    BitsBits
    KilobitsKilobits
    MegabitsMegabits
    GigabitsGigabits
    TerabitsTerabits
    PercentPercent
    CountCount
    BytesSecondBytes/Second
    KilobytesSecondKilobytes/Second
    MegabytesSecondMegabytes/Second
    GigabytesSecondGigabytes/Second
    TerabytesSecondTerabytes/Second
    BitsSecondBits/Second
    KilobitsSecondKilobits/Second
    MegabitsSecondMegabits/Second
    GigabitsSecondGigabits/Second
    TerabitsSecondTerabits/Second
    CountSecondCount/Second
    NoneNone
    NameValue
    SECONDSSeconds
    MICROSECONDSMicroseconds
    MILLISECONDSMilliseconds
    BYTESBytes
    KILOBYTESKilobytes
    MEGABYTESMegabytes
    GIGABYTESGigabytes
    TERABYTESTerabytes
    BITSBits
    KILOBITSKilobits
    MEGABITSMegabits
    GIGABITSGigabits
    TERABITSTerabits
    PERCENTPercent
    COUNTCount
    BYTES_SECONDBytes/Second
    KILOBYTES_SECONDKilobytes/Second
    MEGABYTES_SECONDMegabytes/Second
    GIGABYTES_SECONDGigabytes/Second
    TERABYTES_SECONDTerabytes/Second
    BITS_SECONDBits/Second
    KILOBITS_SECONDKilobits/Second
    MEGABITS_SECONDMegabits/Second
    GIGABITS_SECONDGigabits/Second
    TERABITS_SECONDTerabits/Second
    COUNT_SECONDCount/Second
    NONENone
    Value
    Seconds
    Microseconds
    Milliseconds
    Bytes
    Kilobytes
    Megabytes
    Gigabytes
    Terabytes
    Bits
    Kilobits
    Megabits
    Gigabits
    Terabits
    Percent
    Count
    Bytes/Second
    Kilobytes/Second
    Megabytes/Second
    Gigabytes/Second
    Terabytes/Second
    Bits/Second
    Kilobits/Second
    Megabits/Second
    Gigabits/Second
    Terabits/Second
    Count/Second
    None

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo AWS Cloud Control

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.86.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial