Skip to content

Resource: awsMacieS3BucketAssociation

\~> 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.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.macieS3BucketAssociation.MacieS3BucketAssociation(this, "example", {
  bucketName: "tf-macie-example",
  classificationType: {
    oneTime: "FULL",
  },
  prefix: "data",
});

Argument Reference

The following arguments are supported:

  • bucketName - (Required) The name of the S3 bucket that you want to associate with Amazon Macie.
  • classificationType - (Optional) The configuration of how Amazon Macie classifies the S3 objects.
  • memberAccountId - (Optional) The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If memberAccountId isn't specified, the action associates specified S3 resources with Macie for the current master account.
  • prefix - (Optional) Object key prefix identifying one or more S3 objects to which the association applies.

The classificationType object supports the following:

  • continuous - (Optional) A string value indicating that Macie perform a one-time classification of all of the existing objects in the bucket. The only valid value is the default value, full.
  • oneTime - (Optional) A string value indicating whether or not Macie performs a one-time classification of all of the existing objects in the bucket. Valid values are none and full. Defaults to none indicating that Macie only classifies objects that are added after the association was created.

Attributes Reference

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

  • id - The ID of the association.