Integrate with AWS Control Tower
Integrate Workload Security with AWS Control Tower to ensure that every account added through Control Tower Account Factory is automatically provisioned in Workload Security, providing centralized visibility to the security posture of EC2 instances deployed in each account as well as the foundation for policy and billing automation.
The Lifecycle Hook solution provides a CloudFormation template which, when launched in the Control Tower Master Account, deploys AWS infrastructure to ensure Workload Security monitors each Account Factory AWS account automatically. The solution consists of 2 Lambda functions; one to manage our role and access Workload Security, and another to manage the lifecycle of the first Lambda. AWS Secrets Manager is leveraged to store the API key for Workload Security in the Master account and a CloudWatch Events rule is configured to trigger the customization Lambda when a Control Tower account is successfully deployed.
Once Workload Security is integrated with AWS Control Tower, it will be implemented in the following way:
- During stack launch, the lifecycle Lambda is executed for each existing Control Tower Account, including the Control Tower Master, Audit, and Log accounts.
- After launch, a CloudWatch event rule triggers the lifecycle Lambda for each successful Control Tower CreateManagedAccount event.
- The lifecycle Lambda function retrieves the Workload Security API Key from AWS Secrets Manager, then gets the External ID for your organization from the Workload Security API.
- The Lambda function assumes the ControlTowerExecution role in the target Managed Account in order to create the necessary cross account role and associated policy.
- A call is made to the Workload Security API to add this Managed Account to your tenant.
- In the Workload Security console, go to Administration > User Management > API Keys and click New. Select a name for the key and the Full Access role. Be sure to save the key as it cannot be retrieved later. This key will be used to authenticate the automation from the AWS Control Tower Master to the console API. For more information, see Create and API key.
- Log into the AWS Control Tower master account. Navigate to the CloudFormation Service, select the region in which AWS Control Tower was deployed, and launch the lifecycle template.
- In the lifecycle template, enter your API Key generated in step 1. Leave the FQDN of your console as the default entry.
- Check the box acknowledging that AWS CloudFormation might create IAM resources. Select Create Stack, and the integration will start adding your AWS accounts to Workload Security.
- Once all your accounts have been imported, automate agent installation and activate protection.
Upgrade AWS Control Tower integration
As new capabilities are added to Workload Security, it might be necessary to update the permissions for the application's cross-account role. To update the role deployed by the lifecycle hook, update the Workload Security stack with the latest template, which can be found at its original URL. The parameter values should not be modified from their original values unless directed by Trend Micro Support. Updating the CloudFormation stack will update the role used by all existing accounts and the role created for future enrollments.
Remove AWS Control Tower integration
To remove the lifecycle hook, identify and delete the CloudFormation stack. Protection for Managed Accounts that have already been added will remain in place. For details on removing an AWS account from Workload Security, see Remove an AWS account .