Import a Region
Note
The following section only applies when the solution’s account discovery mode is self-managed. For information on how account discovery works in AWS Organizations mode, see the AWS Organizations Account Discovery Mode section.
Importing a Region requires certain infrastructure to be deployed. This infrastructure consists of Global and Regional resources:
Global – Resources that are deployed once in an account and reused for each Region imported.
-
An IAM role (WorkloadDiscoveryRole)
Regional – Resources that are deployed in each Region imported.
-
An AWS Config Delivery Channel
-
An Amazon S3 bucket for AWS Config
-
An IAM role (ConfigRole)
There are two options to deploy this infrastructure:
-
AWS CloudFormation StackSets (recommended)
-
AWS CloudFormation
Import a Region
These steps guide you through importing a Region and deploying the AWS CloudFormation templates.
-
Sign in to Workload Discovery on AWS. Refer to Log in to Workload Discovery on AWS for the URL.
-
In the navigation menu, select Accounts.
-
Choose Import.
-
Select the import method:
-
Add Accounts & Regions using a CSV file.
-
Add Accounts & Regions using a form.
-
CSV file
Provide a Comma Separated Value (CSV) file that contains the Regions to be imported in the following format.
"accountId","accountName","region" 123456789012,"test-account-1",eu-west-2 123456789013,"test-account-2",eu-west-1 123456789013,"test-account-2",eu-west-2 123456789014,"test-account-3",eu-west-3
-
Select Upload a CSV.
-
Locate and open your CSV file.
-
Review the Regions table, then select Import.
-
In the modal dialog, download the Global resources template and Regional Resources template.
-
Deploy the CloudFormation templates in the relevant accounts (refer to Deploy the AWS CloudFormation templates section).
-
Once the global and regional resource templates have been deployed, select both boxes to confirm that the installation is complete and choose Import.
Form
Provide the Regions to import using the form:
-
For Account ID, enter a 12-digit account ID or select an existing account ID.
-
For Account name, enter an account name or use a pre-populated value when selecting an existing account ID.
-
Select the Regions to import.
-
Select Add to populate the Regions in the Regions table below.
-
Review the Regions table, then select Import.
-
In the modal dialog, download the Global resources template and Regional Resources template.
-
Deploy the CloudFormation templates in the relevant accounts (refer to Deploy the AWS CloudFormation templates section).
-
Once the global and regional resource templates have been deployed, select both boxes to confirm the installation is complete and choose Import.
Deploy the AWS CloudFormation templates
Global resources must be deployed once per account. Do not deploy this template when importing a Region from an account that contains a Region that is already imported into Workload Discovery on AWS. If the Region has already been imported, follow the instructions in Deploy the stack to provision the Regional resources.
Use CloudFormation StackSets to provision Global resources across accounts
Important
First, complete the Prerequisites for stack set operations to activate StackSets in your target accounts.
-
In the administrator account
, sign in to the AWS CloudFormation console . -
From the navigation menu, select StackSets.
-
Choose Create StackSet.
-
On the Choose a template page, under Permissions:
If you’re using AWS Organizations, choose either Service managed permissions or Self service permissions. For details, refer to Using StackSets in an AWS Organization.
-
If you’re not using AWS Organizations, enter the IAM run role name used when following the StackSets prerequisite steps. For details, refer to Grant self-managed permissions.
-
Under Specify template, select Upload a template file. Choose the
global-resources.template
file (downloaded earlier when you imported a Region either by CSV file or form), and choose Next. -
On the Specify StackSet details page, assign a name to your StackSet. For information about naming character limitations, refer to IAM and AWS STS quotas in the AWS Identity and Access Management User Guide.
-
Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.
Field Name | Default | Description |
---|---|---|
AccountId | The deployment account ID | The account ID of the original deployment account. You must leave this value as the default. |
-
Choose Next.
-
On the Configure StackSet options page, choose Next.
-
On the Set deployment options page, under Accounts, enter the account IDs for deploying the account role in the Account numbers box.
-
Under Specify regions, select a Region to install the stack.
-
Under Deployment options, select Parallel, and then choose Next.
-
On the Review page, check the box acknowledging that AWS CloudFormation might create IAM resources with custom names.
-
Choose Submit.
Use CloudFormation StackSets to provision Regional resources
Important
First, complete the Prerequisites for stack set operations to activate StackSets in your target accounts.
If you have some Regions with AWS Config installed and some without, you must perform two StackSet operations, one for the Regions with AWS Config installed and one for those without.
-
In the administrator account
, sign in to the AWS CloudFormation console . -
From the navigation menu, select StackSets.
-
Choose Create StackSet.
-
On the Choose a template page, under Permissions:
-
If you’re using AWS Organizations, choose either Service managed permissions or Self service permissions. For details, refer to Using StackSets in an AWS Organization.
-
If you’re not using AWS Organizations, enter the IAM run role name used when following the StackSets prerequisite steps. For details, refer to Grant self-managed permissions.
-
-
Under Specify template, select Upload a template file. Choose the
regional-resources.template
file (downloaded earlier when you imported a Region either by CSV file or form), and choose Next. -
On the Specify StackSet details page, assign a name to your StackSet. For information about naming character limitations, refer to IAM and AWS STS quotas in the AWS Identity and Access Management User Guide.
-
Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.
Field Name | Default | Description |
---|---|---|
AccountId | The deployment account ID | The account ID of the original deployment account. You must leave this value as the default. |
AggregationRegion | The deployment Region | The Region that was originally deployed into. You must leave this value as the default. |
AlreadyHaveConfigSetup |
No
|
Confirmation of whether the Region already has AWS Config installed. Set to Yes if AWS Config is already installed in this Region. |
-
Choose Next.
-
On the Configure StackSet options page, choose Next.
-
On the Set deployment options page, under Accounts, enter the account IDs to deploy the account role to in the Account numbers box.
-
Under Specify regions, select a Region to install the stack. This installs the stack in these Regions in all the accounts entered in step 6.
-
Under Deployment options, select Parallel, and then choose Next.
-
On the Review page, check the box acknowledging that AWS CloudFormation might create IAM resources with custom names.
-
Choose Submit.
Deploy the stack to provision the Global resources using CloudFormation
Global resources must be deployed once per account. Do not deploy this template when importing a Region from an account that contains a Region that is already imported into Workload Discovery on AWS.
-
Sign in to the AWS CloudFormation console
. -
Choose Create stack, and then select With new resources (standard).
-
On the Create stack page, in the Specify template section, select Upload a template file.
-
Choose Choose file and select the
global-resources.template
file that (downloaded earlier when you imported a Region either by CSV file or form), and choose Next. -
On the Specify stack details page, assign a name to your solution stack. For information about naming character limitations, refer to IAM and AWS STS quotas in the AWS Identity and Access Management User Guide.
-
Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.
Field Name | Default | Description |
---|---|---|
Stack name |
workload-discovery
|
The name of this AWS CloudFormation stack. |
AccountId | Deployment account ID | The account ID of the original deployment account. You must leave this value as the default. |
-
Choose Next.
-
Select the box acknowledging that AWS CloudFormation might create IAM resources with custom names.
-
Choose Create stack.
The new Regions will be scanned during the next discovery process, which runs at 15-minute intervals, for example: 15:00, 15:15, 15:30, 15:45.
Deploy the stack to provision the Regional resources using CloudFormation
-
Sign in to the AWS CloudFormation console
. -
Choose Create stack, and then select With new resources (standard).
-
On the Create stack page, in the Specify template section, select Upload a template file.
-
Choose Choose file and select the
regional-resources.template
file (downloaded earlier when you imported a Region either by CSV file or form), and choose Next. -
On the Specify stack details page, assign a name to your solution stack. For information about naming character limitations, refer to IAM and AWS STS quotas in the AWS Identity and Access Management User Guide.
-
Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.
Field Name | Default | Description |
---|---|---|
AccountId | Solution deployment account ID | The account ID of the original deployment account. Must be left as default. |
AggregationRegion | Solution deployment Region | The Region that was originally deployed into. Must be left as default. |
AlreadyHaveConfigSetup |
No
|
Confirmation of whether the Region already has AWS Config installed. Set to Yes if AWS Config is already
installed in this Region.
|
-
Choose Next.
-
Select the box acknowledging that AWS CloudFormation might create IAM resources with custom names.
-
Choose Create stack.
The new Regions will be scanned during the next discovery process, which runs at 15-minute intervals, for example, 15:00, 15:15, 15:30, 15:45.
Verify the Region was imported correctly
-
Sign in to the solution’s web UI (or refresh the page if it’s already loaded). Refer to Log in to Workload Discovery on AWS for the URL.
-
From the left navigation panel, under Settings, select Imported Regions.
The Region, account name, and account ID appear in the table. The Last Scanned column shows the last discovered resources in that Region.
Note
If the Last Scanned column stays blank for more than 30 minutes, refer to Debugging the discovery component.