# Macie Organization Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: CC-BY-SA-4.0 ## Table of Contents - [Introduction](#introduction) - [Deployed Resource Details](#deployed-resource-details) - [Implementation Instructions](#implementation-instructions) - [References](#references) --- ## Introduction The Macie Organization solution will enable Amazon Macie by delegating administration to a member account within the Organization Management Account and configuring Macie within the delegated administrator account for all the existing and future AWS Organization accounts. Macie is also configured to send the findings to a central S3 bucket encrypted with a KMS key. --- ## Deployed Resource Details ![Architecture](./documentation/macie-org.png) ### 1.0 Organization Management Account #### 1.1 AWS CloudFormation - All resources are deployed via AWS CloudFormation as a `StackSet` and `Stack Instance` within the management account or a CloudFormation `Stack` within a specific account. - The [Customizations for AWS Control Tower](https://aws.amazon.com/solutions/implementations/customizations-for-aws-control-tower/) solution deploys all templates as a CloudFormation `StackSet`. - For parameter details, review the [AWS CloudFormation templates](templates/). #### 1.2 AWS Lambda Function The Lambda function is required to register the Macie delegated administrator account within each region provided #### 1.3 Lambda IAM Role - IAM role used by the Lambda function to register the Macie delegated administrator account within each region provided #### 1.4 Lambda CloudWatch Log Group - All the `AWS Lambda Function` logs are sent to a CloudWatch Log Group `` to help with debugging and traceability of the actions performed. - By default the `AWS Lambda Function` will create the CloudWatch Log Group and logs are encrypted with a CloudWatch Logs service managed encryption key. #### 1.5 Configuration SNS Topic - SNS Topic used to fanout the Lambda function for disabling Macie within each account and region. #### 1.6 Dead Letter Queue (DLQ) - SQS dead letter queue used for retaining any failed Lambda events. #### 1.7 Alarm SNS Topic - SNS Topic used to notify subscribers when messages hit the DLQ. #### 1.8 Macie - Macie is enabled for each existing active account and region during the initial setup - Macie will automatically enable new member accounts/regions when added to the AWS Organization --- ### 2.0 Log Archive Account #### 2.1 AWS CloudFormation - See [1.1 AWS CloudFormation](#11-aws-cloudformation) #### 2.2 Macie Delivery S3 Bucket - S3 bucket where Macie classifications are exported for each account/region within the AWS Organization #### 2.3 Macie - See [1.5 Macie](#15-macie) --- ### 3.0 Audit Account The example solutions use `Audit Account` instead of `Security Tooling Account` to align with the default account name used within the AWS Control Tower setup process for the Security Account. The Account ID for the `Audit Account` SSM parameter is populated from the `SecurityAccountId` parameter within the `AWSControlTowerBP-BASELINE-CONFIG` StackSet. #### 3.1 AWS CloudFormation - See [1.1 AWS CloudFormation](#11-aws-cloudformation) #### 3.2 Macie Delivery KMS Key - Macie is configured to encrypt the exported findings with a customer managed KMS key #### 3.3 Configuration IAM Role - IAM role assumed by the Lambda function within the management account to configure Macie within each region provided #### 3.4 Macie - See [1.5 Macie](#15-macie) --- ### 4.0 All Existing and Future Organization Member Accounts #### 4.1 Macie - See [1.5 Macie](#15-macie) #### 4.2 Disable Macie Role - An IAM role is created within all the accounts to disable Macie when the Disable Macie parameter is set to 'true' and the CloudFormation stack is updated. --- ## Implementation Instructions ### Prerequisites ### Prerequisites 1. [Download and Stage the SRA Solutions](../../../docs/DOWNLOAD-AND-STAGE-SOLUTIONS.md). **Note:** This only needs to be done once for all the solutions. 2. Verify that the [SRA Prerequisites Solution](../../common/common_prerequisites/) has been deployed. ### Solution Deployment Choose a Deployment Method: - [AWS CloudFormation](#aws-cloudformation) - [Customizations for AWS Control Tower](../../../docs/CFCT-DEPLOYMENT-INSTRUCTIONS.md) #### AWS CloudFormation In the `management account (home region)`, launch an AWS CloudFormation **Stack** using one of the options below: - **Option 1:** (Recommended) Use the [sra-macie-org-main-ssm.yaml](templates/sra-macie-org-main-ssm.yaml) template. This is a more automated approach where some of the CloudFormation parameters are populated from SSM parameters created by the [SRA Prerequisites Solution](../../common/common_prerequisites/). ```bash aws cloudformation deploy --template-file $HOME/aws-sra-examples/aws_sra_examples/solutions/macie/macie_org/templates/sra-macie-org-main-ssm.yaml --stack-name sra-macie-org-main-ssm --capabilities CAPABILITY_NAMED_IAM ``` - **Option 2:** Use the [sra-macie-org-main.yaml](templates/sra-macie-org-main.yaml) template. Input is required for the CloudFormation parameters where the default is not set. ```bash aws cloudformation deploy --template-file $HOME/aws-sra-examples/aws_sra_examples/solutions/macie/macie_org/templates/sra-macie-org-main.yaml --stack-name sra-macie-org-main --capabilities CAPABILITY_NAMED_IAM --parameter-overrides pAuditAccountId= pLogArchiveAccountId= pOrganizationId= pRootOrganizationalUnitId= pSRAStagingS3BucketName= ``` #### Verify Solution Deployment 1. Log into the Management account and navigate to the Macie page 1. Validate that the delegated admin account is set for each region 2. Log into the Audit account and navigate to the Macie page 1. Verify the correct Macie configurations have been applied to each region 2. Verify all existing accounts have been enabled 3. Verify the findings export is configured for the S3 bucket 4. Generate sample findings to verify S3 delivery 3. Log into the Log archive account and navigate to the S3 page 1. Verify the sample findings have been delivered #### Solution Delete Instructions 1. In the `management account (home region)`, delete the AWS CloudFormation **Stack** (`sra-macie-org-main-ssm` or `sra-macie-org-main`) created above. 2. In the `management account (home region)`, delete the AWS CloudWatch **Log Group** (e.g. /aws/lambda/) for the Lambda function deployed. 3. In the `log archive acccount (home region)`, delete the S3 bucket (e.g. sra-macie-org-delivery--) created by the solution. --- ## References - [Managing multiple Amazon Macie accounts with AWS Organizations](https://docs.aws.amazon.com/macie/latest/user/macie-organizations.html)