AWS Macie S3 Bucket Association

This page shows how to write Terraform and CloudFormation for Macie S3 Bucket Association and write them securely.

aws_macie_s3_bucket_association (Terraform)

The S3 Bucket Association in Macie can be configured in Terraform with the resource name aws_macie_s3_bucket_association. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

github-icontesera/terraform-modules
resource "aws_macie_s3_bucket_association" "example" {
  bucket_name = "tf-macie-example"
  prefix      = "data"

  classification_type {
    one_time = "FULL"
github-icongauravgitdir/Jack
resource "aws_macie_s3_bucket_association" "example" {
  bucket_name = var.bucket_name
}


github-iconniveklabs/aws
resource "aws_macie_s3_bucket_association" "this" {
  bucket_name       = var.bucket_name
  member_account_id = var.member_account_id
  prefix            = var.prefix

  dynamic "classification_type" {
github-iconasrkata/SebastianUA-terraform
resource "aws_macie_s3_bucket_association" "macie_s3_bucket_association" {
  count = var.enable_macie_s3_bucket_association ? 1 : 0

  bucket_name = var.macie_s3_bucket_association_bucket_name

  member_account_id = var.macie_s3_bucket_association_member_account_id != "" && !var.enable_macie_member_account_association ? var.macie_s3_bucket_association_member_account_id : element(concat(aws_macie_member_account_association.macie_member_account_association.*.id, [""]), 0)

Parameters

Explanation in Terraform Registry

NOTE: This resource interacts with Amazon Macie Classic. Macie Classic cannot be activated in new accounts. See the FAQ for more details. Associates an S3 resource with Amazon Macie for monitoring and data classification. NOTE: Before using Amazon Macie for the first time it must be enabled manually. Instructions are here.

AWS::Macie::FindingsFilter (CloudFormation)

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

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 S3 Bucket Association?

AWS Macie S3 Bucket Association 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 S3 Bucket Association?

For Terraform, the tesera/terraform-modules, gauravgitdir/Jack and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.