AWS Macie Findings Filter

This page shows how to write Terraform and CloudFormation for Macie Findings Filter and write them securely.

aws_macie2_findings_filter (Terraform)

The Findings Filter in Macie can be configured in Terraform with the resource name aws_macie2_findings_filter. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are supported:

  • finding_criteria - (Required) The criteria to use to filter findings.
  • name - (Optional) A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 characters. If omitted, Terraform will assign a random, unique name. Conflicts with name_prefix.
  • name_prefix - (Optional) Creates a unique name beginning with the specified prefix. Conflicts with name.
  • description - (Optional) A custom description of the filter. The description can contain as many as 512 characters.
  • action - (Required) The action to perform on findings that meet the filter criteria (finding_criteria). Valid values are: ARCHIVE, suppress (automatically archive) the findings; and, NOOP, don't perform any action on the findings.
  • position - (Optional) The position of the filter in the list of saved filters on the Amazon Macie console. This value also determines the order in which the filter is applied to findings, relative to other filters that are also applied to the findings.
  • tags - (Optional) A map of key-value pairs that specifies the tags to associate with the filter.

The finding_criteria object supports the following:

  • criterion - (Optional) A condition that specifies the property, operator, and one or more values to use to filter the results. (documented below)

The criterion object supports the following:

  • field - (Required) The name of the field to be evaluated.
  • eq_exact_match - (Optional) The value for the property exclusively matches (equals an exact match for) all the specified values. If you specify multiple values, Amazon Macie uses AND logic to join the values.
  • eq - (Optional) The value for the property matches (equals) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.
  • neq - (Optional) The value for the property doesn't match (doesn't equal) the specified value. If you specify multiple values, Amazon Macie uses OR logic to join the values.
  • lt - (Optional) The value for the property is less than the specified value.
  • lte - (Optional) The value for the property is less than or equal to the specified value.
  • gt - (Optional) The value for the property is greater than the specified value.
  • gte - (Optional) The value for the property is greater than or equal to the specified value.

In addition to all arguments above, the following attributes are exported:

  • id - The unique identifier (ID) of the macie Findings Filter.
  • arn - The Amazon Resource Name (ARN) of the Findings Filter.

Explanation in Terraform Registry

Provides a resource to manage an Amazon Macie Findings Filter.

AWS::Macie::FindingsFilter (CloudFormation)

The FindingsFilter in Macie can be configured in CloudFormation with the resource name AWS::Macie::FindingsFilter. The following sections describe 8 examples of how to use the resource and its parameters.

Example Usage from GitHub

product.template-sa-east-1.yaml#L9
    Type: AWS::Macie::FindingsFilter
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
    Properties:
      Name: !Ref 'Name'
      FindingCriteria: {}
Outputs:
product.template-us-west-1.yaml#L9
    Type: AWS::Macie::FindingsFilter
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
    Properties:
      Name: !Ref 'Name'
      FindingCriteria: {}
Outputs:
product.template-eu-north-1.yaml#L9
    Type: AWS::Macie::FindingsFilter
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
    Properties:
      Name: !Ref 'Name'
      FindingCriteria: {}
Outputs:
product.template-ap-northeast-2.yaml#L9
    Type: AWS::Macie::FindingsFilter
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
    Properties:
      Name: !Ref 'Name'
      FindingCriteria: {}
Outputs:
product.template-us-east-1.yaml#L9
    Type: AWS::Macie::FindingsFilter
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
    Properties:
      Name: !Ref 'Name'
      FindingCriteria: {}
Outputs:
MacieFindingsFilterSpecification.json#L3
    "AWS::Macie::FindingsFilter.Criterion": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-macie-findingsfilter-criterion.html"
    },
    "AWS::Macie::FindingsFilter.FindingCriteria": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-macie-findingsfilter-findingcriteria.html",
      "Properties": {
awsResouceIconMatches.json#L2214
        "resourceType": "AWS::Macie::FindingsFilter",
        "filePath": null
      },
      {
        "resourceType": "AWS::Macie::CustomDataIdentifier",
        "filePath": null
template.json#L1687
    "AWS::Macie::FindingsFilter": {
      "Type": "AWS::Macie::FindingsFilter",
      "Properties": {}
    },
    "AWS::EC2::LaunchTemplate": {
      "Type": "AWS::EC2::LaunchTemplate",

Parameters

Explanation in CloudFormation Registry

The AWS::Macie::FindingsFilter resource represents an individual findings filter that you create and save to view, analyze, and manage findings. A findings filter is a set of criteria that specifies which findings to include in the results of a query for findings. A findings filter can also perform specific actions on findings that meet the filter's criteria.

A Session must exist for the account before you can create a FindingsFilter. Use a DependsOn attribute to ensure that the Session is created before the other resources. For example, "DependsOn: Session".

Frequently asked questions

What is AWS Macie Findings Filter?

AWS Macie Findings Filter is a resource for Macie of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Macie Findings Filter?

For CloudFormation, the awslabs/aws-service-catalog-products, awslabs/aws-service-catalog-products and awslabs/aws-service-catalog-products source code examples are useful. See the CloudFormation Example section for further details.