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
resource "aws_macie_s3_bucket_association" "example" {
bucket_name = "tf-macie-example"
prefix = "data"
classification_type {
one_time = "FULL"
resource "aws_macie_s3_bucket_association" "example" {
bucket_name = var.bucket_name
}
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" {
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
-
bucket_name
required - string -
id
optional computed - string -
member_account_id
optional - string -
prefix
optional - string -
classification_type
list block-
continuous
optional - string -
one_time
optional - string
-
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 8 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::Macie::FindingsFilter
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
Properties:
Name: !Ref 'Name'
FindingCriteria: {}
Outputs:
Type: AWS::Macie::FindingsFilter
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
Properties:
Name: !Ref 'Name'
FindingCriteria: {}
Outputs:
Type: AWS::Macie::FindingsFilter
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
Properties:
Name: !Ref 'Name'
FindingCriteria: {}
Outputs:
Type: AWS::Macie::FindingsFilter
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
Properties:
Name: !Ref 'Name'
FindingCriteria: {}
Outputs:
Type: AWS::Macie::FindingsFilter
Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-macie-findingsfilter.html
Properties:
Name: !Ref 'Name'
FindingCriteria: {}
Outputs:
"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": {
"resourceType": "AWS::Macie::FindingsFilter",
"filePath": null
},
{
"resourceType": "AWS::Macie::CustomDataIdentifier",
"filePath": null
"AWS::Macie::FindingsFilter": {
"Type": "AWS::Macie::FindingsFilter",
"Properties": {}
},
"AWS::EC2::LaunchTemplate": {
"Type": "AWS::EC2::LaunchTemplate",
Parameters
-
Name
required - String -
Description
optional - String -
FindingCriteria
required - FindingCriteria -
Action
optional - String -
Position
optional - Integer
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 aFindingsFilter
. Use a DependsOn attribute to ensure that theSession
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.
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.