Source code for AWS serverless application to automatically onboard AWS accounts to CloudGuard when a new account is created, using the AWS Control Tower service.
- ControlTower properly installed in root account.
- CloudGuard account (as a user with All System Resources permission). Sign up here.
- Lambda function for onboarding automation
- EventBridge rule (configured to "listen" to
CreateMenagedAccount
lifecycle event) - Secret Manager's secret for storing API credentials
- CloudWatch Alarm (lambda failures)
- SNS topic for email notifications (subscription confirmation email will be sent)
- Generate CloudGuard API keys - in one of two ways:
- Go to Settings -> Credentials -> Click CREATE API.
- Go to Settings -> Service Accounts -> Click Add Account and give it OnBoarding role or SuperUser role. You can follow instructions here.
- Login to the AWS Console.
- Navigate to Lambda -> Create Function.
- Select "Browse serverless app repository option"
- Check the "Show apps that create custom IAM roles or resource policies".
- Enter
CloudGuard
inside the search input. - Click "cloudguard-automatic-onboarding".
- Enter the required fields
Dome9AccessId
.andDome9SecretKey
with you keys from previous steps. - Enter an email address in the
NotificationEmail
field. Any onboarding failures will be sent to this address. - Check the
I acknowledge that this app creates custom IAM roles.
(If it appears). - Check all the checkboxes under
Capabilities and transforms
(If they appear).