aws-data-landing-zone 0.0.39 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.jsii +219 -162
  2. package/API.md +118 -46
  3. package/README.md +6 -6
  4. package/docs/astro.config.ts +17 -14
  5. package/docs/src/content/docs/components/account-management/accounts.mdx +142 -0
  6. package/docs/src/content/docs/components/account-management/budgets.mdx +152 -0
  7. package/docs/src/content/docs/components/account-management/imgs/account_factory_settings.png +0 -0
  8. package/docs/src/content/docs/components/account-management/imgs/aws_new_account_1.png +0 -0
  9. package/docs/src/content/docs/components/account-management/imgs/aws_new_account_2.png +0 -0
  10. package/docs/src/content/docs/components/account-management/imgs/aws_new_account_3.png +0 -0
  11. package/docs/src/content/docs/components/account-management/imgs/aws_new_account_4.png +0 -0
  12. package/docs/src/content/docs/components/account-management/imgs/aws_new_account_5.png +0 -0
  13. package/docs/src/content/docs/components/account-management/imgs/aws_organisation_ids_final.png +0 -0
  14. package/docs/src/content/docs/components/account-management/regions.mdx +68 -0
  15. package/docs/src/content/docs/components/account-management/service-deny-list.mdx +60 -0
  16. package/docs/src/content/docs/components/account-management/sop-account-setup.mdx +40 -0
  17. package/docs/src/content/docs/components/account-management/sop-add-account.mdx +121 -0
  18. package/docs/src/content/docs/components/account-management/sop-initial-control-tower-setup.mdx +205 -0
  19. package/docs/src/content/docs/components/account-management/tagging.mdx +130 -0
  20. package/docs/src/content/docs/components/build-system/ci-integration.mdx +7 -8
  21. package/docs/src/content/docs/getting-started.mdx +187 -159
  22. package/docs/src/content/docs/introduction.mdx +4 -5
  23. package/docs/src/content/docs/reference/api.md +118 -46
  24. package/docs/src/content/docs/reference/defaults.mdx +62 -0
  25. package/docs/src/content/docs/reference/scripts-commands.mdx +77 -40
  26. package/docs-old/rough-docs/default-notification/default-notification.md +14 -3
  27. package/lib/constructs/account-chatbots/index.d.ts +17 -0
  28. package/lib/constructs/account-chatbots/index.js +2 -2
  29. package/lib/constructs/dlz-budget/index.js +1 -1
  30. package/lib/constructs/dlz-control-tower-control/control-tower-control.js +1 -1
  31. package/lib/constructs/dlz-lake-formation/dlz-lake-formation.js +1 -1
  32. package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader-stack-cache.js +1 -1
  33. package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader.js +1 -1
  34. package/lib/constructs/dlz-stack/index.js +1 -1
  35. package/lib/constructs/dlz-vpc/dlz-account-networks.js +1 -1
  36. package/lib/constructs/dlz-vpc/dlz-vpc.js +1 -1
  37. package/lib/constructs/dlz-vpc/network-address.js +1 -1
  38. package/lib/constructs/iam-identity-center/iam-identity-center-group.js +1 -1
  39. package/lib/constructs/iam-identity-center/iam-identity-center.js +1 -1
  40. package/lib/constructs/iam-identity-center/identity-store-user.js +1 -1
  41. package/lib/constructs/organization-policies/service-control-policy.js +1 -1
  42. package/lib/constructs/organization-policies/tag-policy.js +1 -1
  43. package/lib/data-landing-zone-client.js +1 -1
  44. package/lib/data-landing-zone-types.d.ts +24 -0
  45. package/lib/data-landing-zone-types.js +1 -1
  46. package/lib/data-landing-zone.d.ts +8 -2
  47. package/lib/data-landing-zone.js +9 -3
  48. package/lib/defaults.js +1 -1
  49. package/lib/lib/report/index.js +1 -1
  50. package/lib/scripts/index.d.ts +37 -7
  51. package/lib/scripts/index.js +38 -8
  52. package/lib/stacks/organization/management-stack.js +1 -1
  53. package/lib/stacks/organization/security/audit/global-stack.js +1 -1
  54. package/lib/stacks/organization/security/audit/regional-stack.js +1 -1
  55. package/lib/stacks/organization/security/log/global-stack.js +1 -1
  56. package/lib/stacks/organization/security/log/regional-stack.js +1 -1
  57. package/lib/stacks/organization/workloads/base/global-stack.d.ts +0 -2
  58. package/lib/stacks/organization/workloads/base/global-stack.js +13 -13
  59. package/lib/stacks/organization/workloads/base/regional-stack.js +1 -1
  60. package/lib/stacks/organization/workloads/data-services-phase-1-stack/global-stack.js +1 -1
  61. package/lib/stacks/organization/workloads/data-services-phase-1-stack/regional-stack.js +1 -1
  62. package/lib/stacks/organization/workloads/network-connections-phase-1-stack/global-stack.js +1 -1
  63. package/lib/stacks/organization/workloads/network-connections-phase-2-stack/global-stack.js +1 -1
  64. package/lib/stacks/organization/workloads/network-connections-phase-2-stack/regional-stack.js +1 -1
  65. package/lib/stacks/organization/workloads/network-connections-phase-3-stack/global-stack.js +1 -1
  66. package/lib/stacks/organization/workloads/network-connections-phase-3-stack/regional-stack.js +1 -1
  67. package/package.json +1 -1
  68. package/docs/src/content/docs/components/account-management/introduction.mdx +0 -4
  69. package/docs/src/content/docs/components/build-system/overview.mdx +0 -37
@@ -0,0 +1,152 @@
1
+ ---
2
+ title: Budgets
3
+ description: Budgets
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ AWS Budgets provides tools to monitor and control costs by setting custom spending thresholds. You can create monthly
8
+ budgets, specifying the budget amount and filtering resources based on their tags.
9
+
10
+ :::caution
11
+ Tags used for budget filters must be activated as Cost Allocation Tags in your account settings. See
12
+ [Activate Cost Allocation Tags](/components/account-management/tagging#activate-cost-allocation-tags) for details.
13
+ :::
14
+
15
+ Budget notifications are sent via Amazon SNS, which can be configured for the following delivery methods:
16
+ - **Email**: Each email address must confirm the notification opt-in the first time it is deployed.
17
+ - **Slack**: Notifications are sent to a designated Slack channel. The Slack workspace must be linked to the Management
18
+ Account. For setup details, see the SOP [AWS Chatbot and Slack Integration](sop-account-setup#aws-chatbot-and-slack-integration).
19
+
20
+ Below is an example of creating a budget for resources tagged with `Owner: backend`. Notifications will be sent to a
21
+ specified Slack channel and email address once the budget exceeds $100.
22
+ <DualCode>
23
+ <Fragment slot="ts">
24
+ ```ts
25
+ import {App} from 'aws-cdk-lib';
26
+ import { DataLandingZone, SlackChannel } from 'aws-data-landing-zone';
27
+
28
+ const slackBudgetNotifications: SlackChannel = {
29
+ slackChannelConfigurationName: 'budget-alerts',
30
+ slackWorkspaceId: 'YourWorkspaceId:',
31
+ slackChannelId: 'YourChannelId',
32
+ };
33
+
34
+ const app = new App();
35
+ const dlz = new DataLandingZone(app, {
36
+ budgets: [
37
+ {
38
+ name: 'backend',
39
+ forTags: {
40
+ owner: 'backend',
41
+ },
42
+ amount: 100,
43
+ subscribers: {
44
+ slack: slackBudgetNotifications,
45
+ emails: ['you@org.com'],
46
+ },
47
+ },
48
+ ],
49
+ ...
50
+ });
51
+ ```
52
+ </Fragment>
53
+ <Fragment slot="python">
54
+ ```python
55
+ #!/usr/bin/env python3
56
+ import aws_cdk as cdk
57
+ import aws_data_landing_zone as dlz
58
+
59
+ slack_budget_notifications = dlz.SlackChannel(
60
+ slack_channel_configuration_name="budget-alerts",
61
+ slack_workspace_id="YourWorkspaceId",
62
+ slack_channel_id="YourChannelId",
63
+ )
64
+
65
+ app = cdk.App()
66
+ dlz.DataLandingZone(app,
67
+ budgets=[
68
+ {
69
+ "name": "backend",
70
+ "for_tags": {
71
+ "owner": "backend",
72
+ },
73
+ "amount": 100,
74
+ "subscribers": {
75
+ "slack": slack_budget_notifications,
76
+ "emails": ["you@org.com"],
77
+ },
78
+ },
79
+ ],
80
+ ...
81
+ )
82
+ app.synth()
83
+ ```
84
+ </Fragment>
85
+ </DualCode>
86
+
87
+ ## Defaults
88
+
89
+ The construct provides two default budgets available via `Defaults.budgets`. These include:
90
+ - **Organizational Budget**: Covers all resources across all AWS accounts.
91
+ - **DLZ Resources Budget**: Tracks resources created by DLZ, filtered by the tags `Owner: 'infra'` and `Project: 'dlz'`.
92
+
93
+ The example below demonstrates creating a $100 budget for the entire organization and a $20 budget for DLZ-managed
94
+ resources. Notifications are sent to the specified Slack channel and email address.
95
+ <DualCode>
96
+ <Fragment slot="ts">
97
+ ```ts
98
+ import {App} from 'aws-cdk-lib';
99
+ import { DataLandingZone, SlackChannel } from 'aws-data-landing-zone';
100
+
101
+ const slackBudgetNotifications: SlackChannel = {
102
+ slackChannelConfigurationName: 'budget-alerts',
103
+ slackWorkspaceId: 'YourWorkspaceId:',
104
+ slackChannelId: 'YourChannelId',
105
+ };
106
+
107
+ const app = new App();
108
+ const dlz = new DataLandingZone(app, {
109
+ budgets: [
110
+ ...Defaults.budgets(100, 20, {
111
+ slack: slackBudgetNotifications,
112
+ emails: ['you@org.com'],
113
+ }),
114
+ ],
115
+ ...
116
+ });
117
+ ```
118
+ </Fragment>
119
+ <Fragment slot="python">
120
+ ```python
121
+ #!/usr/bin/env python3
122
+ import aws_cdk as cdk
123
+ import aws_data_landing_zone as dlz
124
+
125
+ slack_budget_notifications = dlz.SlackChannel(
126
+ slack_channel_configuration_name="budget-alerts",
127
+ slack_workspace_id="YourWorkspaceId",
128
+ slack_channel_id="YourChannelId",
129
+ )
130
+
131
+ app = cdk.App()
132
+ dlz.DataLandingZone(app,
133
+ budgets=[
134
+ *dlz.Defaults.budgets(
135
+ 100,
136
+ 20,
137
+ slack=slack_budget_notifications,
138
+ emails=["you@org.com"],
139
+ ),
140
+ ],
141
+ ...
142
+ )
143
+ app.synth()
144
+ ```
145
+ </Fragment>
146
+ </DualCode>
147
+
148
+ ## API References
149
+ - [Budget](/reference/api#dlzbudget)
150
+ - [BudgetProps](/reference/api#dlzbudgetprops)
151
+ - [Defaults.budgets](/reference/api#aws-data-landing-zone.Defaults.budgets)
152
+ - [SlackChannel](/reference/api#slackchannel)
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: Regions
3
+ description: Regions
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ The Data Landing Zone supports deployment across multiple AWS regions. When configuring regions, you must define:
8
+ - **Global Region**: Also referred to as the "home region" by Control Tower, this is where Control Tower is deployed.
9
+ It hosts non-regional resources such as IAM. The global region is deployed first, as other regions may depend on
10
+ resources created there. Note: the global region should not and cannot be changed after deployment.
11
+ - **Additional Regions**: One or more regions where you wish to manage and govern resources.
12
+
13
+
14
+ :::tip
15
+ Not all [AWS regions](https://docs.aws.amazon.com/controltower/latest/userguide/region-how.html) support every resource.
16
+ It is recommended to use major regions like `eu-west-1` or `us-east-1`, which typically have comprehensive support.
17
+ :::
18
+
19
+ Below is an example of defining a global region and one additional region.
20
+
21
+ <DualCode>
22
+ <Fragment slot="ts">
23
+ ```ts
24
+ import {App} from 'aws-cdk-lib';
25
+ import { DataLandingZone } from 'aws-data-landing-zone';
26
+
27
+ const app = new App();
28
+ const dlz = new DataLandingZone(app, {
29
+ regions: {
30
+ global: Region.EU_WEST_1,
31
+ regional: [Region.US_EAST_1],
32
+ },
33
+ ...
34
+ });
35
+ ```
36
+
37
+ </Fragment>
38
+ <Fragment slot="python">
39
+ ```python
40
+ #!/usr/bin/env python3
41
+ import aws_cdk as cdk
42
+ import aws_data_landing_zone as dlz
43
+
44
+ app = cdk.App()
45
+ dlz.DataLandingZone(app,
46
+ regions=dlz.DlzRegions(
47
+ global_=dlz.Region.EU_WEST_1,
48
+ regional=[dlz.Region.US_EAST_1],
49
+ ),
50
+ ...
51
+ )
52
+ app.synth()
53
+ ```
54
+
55
+ </Fragment>
56
+ </DualCode>
57
+
58
+ ## Adding a region
59
+
60
+ 1. Add the region to Control Tower and wait for the setup/deployment to complete.
61
+ 1. Update the Data Landing Zone configuration to include the new region.
62
+ 1. Run the `bootstrapAll` script or manually bootstrap the account using the AWS CDK. Refer to
63
+ [Scripts and Commands](/reference/scripts-commands) for detailed instructions.
64
+
65
+ ## API References
66
+ - [DataLandingZoneProps.regions](/reference/api#aws-data-landing-zone.DataLandingZoneProps.property.regions)
67
+ - [DlzRegions](/reference/api#aws-data-landing-zone.DlzRegions)
68
+ - [Region](/reference/api#aws-data-landing-zone.Region)
@@ -0,0 +1,60 @@
1
+ ---
2
+ title: Service Deny List
3
+ description: Service Deny List
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ The Data Landing Zone supports deployment across multiple AWS regions. When configuring regions, you must define:
8
+ - **Global Region**: Also referred to as the "home region" by Control Tower, this is where Control Tower is deployed.
9
+ It hosts non-regional resources such as IAM. The global region is deployed first, as other regions may depend on
10
+ resources created there. Note: the global region should not and cannot be changed after deployment.
11
+ - **Additional Regions**: One or more regions where you wish to manage and govern resources.
12
+
13
+ :::tip
14
+ Not all [AWS regions](https://docs.aws.amazon.com/controltower/latest/userguide/region-how.html) support every resource.
15
+ It is recommended to use major regions like `eu-west-1` or `us-east-1`, which typically have comprehensive support.
16
+ :::
17
+
18
+ Below is an example of defining a global region and one additional region.
19
+
20
+ <DualCode>
21
+ <Fragment slot="ts">
22
+ ```ts
23
+ import {App} from 'aws-cdk-lib';
24
+ import { DataLandingZone } from 'aws-data-landing-zone';
25
+
26
+ const app = new App();
27
+ const dlz = new DataLandingZone(app, {
28
+ regions: {
29
+ global: Region.EU_WEST_1,
30
+ regional: [Region.US_EAST_1],
31
+ },
32
+ ...
33
+ });
34
+ ```
35
+
36
+ </Fragment>
37
+ <Fragment slot="python">
38
+ ```python
39
+ #!/usr/bin/env python3
40
+ import aws_cdk as cdk
41
+ import aws_data_landing_zone as dlz
42
+
43
+ app = cdk.App()
44
+ dlz.DataLandingZone(app,
45
+ regions=dlz.DlzRegions(
46
+ global_=dlz.Region.EU_WEST_1,
47
+ regional=[dlz.Region.US_EAST_1],
48
+ ),
49
+ ...
50
+ )
51
+ app.synth()
52
+ ```
53
+
54
+ </Fragment>
55
+ </DualCode>
56
+
57
+ ## API References
58
+ - [DataLandingZoneProps.regions](/reference/api#aws-data-landing-zone.DataLandingZoneProps.property.regions)
59
+ - [DlzRegions](/reference/api#aws-data-landing-zone.DlzRegions)
60
+ - [Region](/reference/api#aws-data-landing-zone.Region)
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: SOP - Account Setup
3
+ description: SOP - Account Setup
4
+ ---
5
+
6
+ This Standard Operating Procedure (SOP) provides a once-off guide for enabling and configuring various AWS services
7
+ required for specific features in the Data Landing Zone.
8
+
9
+ ## AWS Chatbot and Slack Integration
10
+
11
+ To deliver notifications to a Slack channel, a one-time account-level setup is required to integrate the Slack
12
+ Workspace with AWS Chatbot. While the Data Landing Zone (DLZ) manages the SNS topics and Slack channel configurations
13
+ using the `SlackChannel` construct, the initial Slack Workspace integration must be completed manually.
14
+
15
+ ### Steps to Connect AWS Chatbot to Slack
16
+
17
+ The following steps outline the process of connecting AWS Chatbot to your Slack Workspace:
18
+
19
+ 1. Open the **AWS Chatbot Console** and select Slack as your chat platform.
20
+ 2. Click **Configure new client** under Slack to begin the authorization process.
21
+ 3. Log in to the Slack workspace where notifications will be sent.
22
+ 4. Review and approve the requested permissions for AWS Chatbot.
23
+ 5. Verify the installation in Slack by locating the app under the **Apps** section.
24
+
25
+ Additional References:
26
+ - Refer to [Step 1 of the AWS documentation](https://docs.aws.amazon.com/chatbot/latest/adminguide/slack-setup.html#slack-client-setup)
27
+ for detailed instructions.
28
+
29
+ ### Available Integrations
30
+
31
+ :::note
32
+ Slack is used only for one-way notifications from AWS to Slack. A default "Deny All" IAM policy is applied to the
33
+ ChatBot guardrails for enhanced security.
34
+ :::
35
+
36
+ Slack notifications can be configured for the following accounts and regions:
37
+
38
+ 1. **AWS Budgets**: Requires linking the Slack Workspace in the **Management Account**.
39
+ 2. **AWS Security Hub**: Requires linking the Slack Workspace in the **Security Audit Account**.
40
+ 3. **Default Application Notifications**: Requires linking the Slack Workspace in each individual account.
@@ -0,0 +1,121 @@
1
+ ---
2
+ title: SOP - Control Tower Setup
3
+ description: SOP - Control Tower Setup
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ This Standard Operating Procedure (SOP) provides a guide on how to add a new or existing account to AWS Control Tower.
8
+
9
+ ## Create a new Account
10
+
11
+ :::caution
12
+ Ensure that the [Account Factory network configuration](sop-initial-control-tower-setup#configure-account-factory)
13
+ is correctly set up before creating new accounts.
14
+ :::
15
+
16
+ https://docs.aws.amazon.com/controltower/latest/userguide/enroll-account.html
17
+
18
+ 1. Log in to the Management Account and navigate to Control Tower (CT). Ensure you are in the correct region.
19
+ 2. Click on **Account Factory** in the left-hand menu, then select **Create Account**.
20
+ 3. Fill in all the required details:
21
+ - Ensure the email address exists and is unique. Use "plus aliasing" (e.g., `user+alias@example.com`) if you need
22
+ to create multiple accounts with the same email domain.
23
+ - Place the account under the `Workloads` OU.
24
+
25
+ ![Creating a new account - Step 1](imgs/aws_new_account_1.png)
26
+
27
+ 4. Check your email inbox. You will receive two emails, one of which contains the invitation link for the specified
28
+ SSO user.
29
+
30
+ ![SSO invitation email](imgs/aws_new_account_2.png)
31
+
32
+ 5. Follow the invitation link and choose a password for the SSO user.
33
+
34
+ ![Setting up SSO password](imgs/aws_new_account_3.png)
35
+
36
+ 6. Log in with the SSO user and set up MFA:
37
+ - Select **Authenticator app** and click **Next**.
38
+ - Use your preferred authenticator app to scan the QR code or manually enter the key and complete the process.
39
+
40
+ ![Setting up MFA](imgs/aws_new_account_4.png)
41
+
42
+ 7. You should now be able to log in to the account using the SSO user.
43
+
44
+ ![Successful SSO login](imgs/aws_new_account_5.png)
45
+
46
+ 8. Make a note of the new account ID. Add the account to the `workloads` OU in the CDK construct. Assign the account type:
47
+ - `DlzAccountType.DEVELOP` - Accounts with fewer security restrictions, designed to enhance the developer experience.
48
+ - `DlzAccountType.PRODUCTION` - Accounts requiring tight security measures, used for hosting production workloads.
49
+
50
+ <DualCode>
51
+ <Fragment slot="ts">
52
+ ```ts
53
+ import {App} from 'aws-cdk-lib';
54
+ import { DataLandingZone } from 'aws-data-landing-zone';
55
+
56
+ const app = new App();
57
+ const dlz = new DataLandingZone(app, {
58
+ ...
59
+ organization: {
60
+ workloads: {
61
+ ouId: 'ou-h2l0-gjr36ikn',
62
+ accounts: [{
63
+ name: 'ACCOUNT_NAME',
64
+ accountId: 'ACCOUNT_ID',
65
+ type: DlzAccountType.DEVELOP,
66
+ ...
67
+ }
68
+ ]
69
+ },
70
+ },
71
+ ...
72
+ }
73
+ });
74
+ ```
75
+
76
+ </Fragment>
77
+ <Fragment slot="python">
78
+ ```python
79
+ #!/usr/bin/env python3
80
+ import aws_cdk as cdk
81
+ import aws_data_landing_zone as dlz
82
+
83
+ app = cdk.App()
84
+ dlz.DataLandingZone(app,
85
+ ...
86
+ organization=dlz.DLzOrganization(
87
+ workloads=dlz.OrgOuWorkloads(
88
+ ou_id='ou-h2l0-gjr36ikn',
89
+ accounts=[
90
+ dlz.DLzAccount(
91
+ name='development',
92
+ account_id='123456789012',
93
+ type=dlz.DlzAccountType.DEVELOP,
94
+ ),
95
+ ],
96
+ ),
97
+ )
98
+ ),
99
+ )
100
+
101
+ app.synth()
102
+ ````
103
+ </Fragment>
104
+ </DualCode>
105
+
106
+ 9. Run the `bootstrapAll` script or manually bootstrap the account using the AWS CDK. Refer to
107
+ [Scripts and Commands](/reference/scripts-commands) for detailed instructions.
108
+
109
+ Additional References:
110
+ - [Provision accounts with AWS Service Catalog Account Factory ](https://docs.aws.amazon.com/controltower/latest/userguide/provision-as-end-user.html)
111
+
112
+
113
+ ## Enroll an existing Account
114
+
115
+ To enroll an existing account into Control Tower, follow the steps outlined in the
116
+ [official AWS documentation](https://docs.aws.amazon.com/controltower/latest/userguide/quick-account-provisioning.html).
117
+
118
+ ## Additional Account Setup
119
+
120
+ See the [Account Setup](sop-account-setup) SOP for additional details on setting up one-time AWS Services and
121
+ integrations required for certain features to work in the Data Landing Zone.
@@ -0,0 +1,205 @@
1
+ ---
2
+ title: SOP - Control Tower Setup
3
+ description: SOP - Control Tower Setup
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ [AWS Control Tower](https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html) provides
8
+ a streamlined way to set up and govern a multi-account AWS environment, adhering to AWS best practices.
9
+
10
+ The Data Landing Zone (DLZ) does not manage your Control Tower configuration but requires it to be manually configured.
11
+ These resources are then passed to the Data Landing Zone CDK construct. This approach ensures DLZ can be adopted in
12
+ existing Control Tower setups or newly created (greenfield) environments.
13
+
14
+ ## Prerequisites
15
+
16
+ You must have an existing AWS account that can act as or already serves as the head of the AWS Organization/Control
17
+ Tower. Alternatively, create a new Management AWS account by signing up at
18
+ [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).
19
+ - Use an email address not already associated with an AWS account and ensure it is accessible.
20
+ - Store the username and password securely.
21
+ - You will have to link a Credit card to the account.
22
+
23
+ This account will be referred to as the Management account.
24
+
25
+ Additional References:
26
+ - [AWS Control Tower Prerequisites](https://docs.aws.amazon.com/controltower/latest/userguide/setting-up.html)
27
+
28
+ ## Enable Control Tower
29
+
30
+ 1. Log in to the Management account and navigate to [Control Tower](https://console.aws.amazon.com/controltower)
31
+ 1. Make a choice on what you want your `home`/`global` region is. This is the region where you CT will be deployed.
32
+ Not all [regions](https://docs.aws.amazon.com/controltower/latest/userguide/region-how.html) supports all resources.
33
+ It is recommended to use "major" region, both `eu-west-1` or `us-east-1` regions are usually good choices.
34
+ 1. Choose Set up landing zone.
35
+ 1. Ensure your `home` region is correct and select any other regions you want to manage and govern.
36
+ 1. Select "Opt out of creating OU", we will create them manually after Control Tower is created.
37
+ 1. Provide email addresses for the `Audit` and `Log Archive` accounts. These accounts will be created by Control Tower
38
+ under the `Security` OU.
39
+ 1. Click **Set up landing zone**.
40
+ 1. The setup process may take up to an hour, although it is often completed more quickly.
41
+
42
+ Additional References:
43
+ - [AWS Control Tower quick start guide](https://docs.aws.amazon.com/controltower/latest/userguide/quick-start.html)
44
+
45
+
46
+ ## Create AWS Organization OUs
47
+
48
+ 1. Log in to the Management account and navigate to [Control Tower](https://console.aws.amazon.com/controltower)
49
+ 2. Select **Organizational Units** from the left-hand menu, then click **Add an OU**.
50
+ 3. Ensure the following OUs are created if not already present:
51
+ - `Workloads`
52
+ - `Suspended`
53
+ 4. Move any existing accounts into the `Workloads` OU for use with the Data Landing Zone.
54
+
55
+ :::caution
56
+ When moving AWS accounts between OUs, note that accounts will inherit the properties, such as SCPs, of the new OU
57
+ and will no longer be governed by the properties of the previous OU.
58
+ :::
59
+
60
+ ## Verify IAM Identity Center
61
+
62
+ 1. Log in to the Management account and navigate to [Control Tower](https://console.aws.amazon.com/controltower)
63
+ 2. In the left-hand menu, navigate to **Users and Access**.
64
+ 3. Verify that **IAM Identity Center** is enabled.
65
+
66
+ ## Configure Account Factory
67
+
68
+ The Account Factory will be used to manually create AWS accounts for use with the Data Landing Zone.
69
+
70
+ Since VPCs will be defined by the DLZ CDK construct, Control Tower's VPC creation needs to be disabled. Follow the
71
+ [official AWS documentation](https://docs.aws.amazon.com/controltower/latest/userguide/configure-without-vpc.html)
72
+ to disable VPC creation:
73
+
74
+ 1. Log in to the Management account and navigate to [Control Tower](https://console.aws.amazon.com/controltower)
75
+ 2. In the Control Tower console, select **Account Factory**.
76
+ 3. Edit the **Network configuration**:
77
+ - Disable **Internet-accessible subnet**.
78
+ - Set **Maximum number of private subnets** to 0.
79
+ - Deselect all **Regions for VPC creation**.
80
+ 4. Save your changes.
81
+
82
+ ![account_factory_settings.png](imgs/account_factory_settings.png)
83
+
84
+ ## Optionally create workload accounts
85
+
86
+ Follow the [SOP - Add Account](sop-add-account) to create new accounts or enroll existing accounts under the `Workloads` OU.
87
+
88
+ ## Gather the required information for DLZ
89
+
90
+ Gather the following IDs required by the DLZ construct in the
91
+ [AWS Organisation](https://us-east-1.console.aws.amazon.com/organizations/v2/home/accounts) console:
92
+
93
+ - AWS Organisation ID
94
+ - Management account ID
95
+ - Security OU ID
96
+ - Audit Account ID
97
+ - Log Archive Account ID
98
+ - Workloads OU ID
99
+ - Any additional Account IDs that you want to use with DLZ
100
+
101
+ ![aws_organisation_ids_final.png](imgs/aws_organisation_ids_final.png)
102
+
103
+ ## Configure the DLZ CDK Construct
104
+
105
+ After gathering the required information, input the IDs into the DLZ CDK construct. Below is an example configuration
106
+ for two accounts in the `Workloads` OU. Additional accounts can be added as needed.
107
+
108
+ <DualCode>
109
+ <Fragment slot="ts">
110
+ ```ts
111
+ import {App} from 'aws-cdk-lib';
112
+ import { DataLandingZone } from 'aws-data-landing-zone';
113
+
114
+ const app = new App();
115
+ const dlz = new DataLandingZone(app, {
116
+ ...
117
+ organization: {
118
+ organizationId: 'o-0f5h921gk9',
119
+ root: { accounts: { management: { accountId: '123456789012', }, }, },
120
+ ous: {
121
+ security: {
122
+ ouId: 'ou-hj29-dfhjj787i7',
123
+ accounts: {
124
+ log: { accountId: '123456789012', },
125
+ audit: { accountId: '123456789012', },
126
+ },
127
+ },
128
+ workloads: {
129
+ ouId: 'ou-h2l0-gjr36ikn',
130
+ accounts: [{
131
+ name: 'development',
132
+ accountId: '123456789012',
133
+ type: DlzAccountType.DEVELOP,
134
+ ...
135
+ },{
136
+ name: 'production',
137
+ accountId: '123456789012',
138
+ type: DlzAccountType.PRODUCTION,
139
+ ...
140
+ },
141
+
142
+ ...AS MANY ACCOUNTS AS DESIRED...
143
+ ]
144
+ },
145
+ },
146
+ ...
147
+ }
148
+ });
149
+ ```
150
+
151
+ </Fragment>
152
+ <Fragment slot="python">
153
+ ```python
154
+ #!/usr/bin/env python3
155
+ import aws_cdk as cdk
156
+ import aws_data_landing_zone as dlz
157
+
158
+ app = cdk.App()
159
+ dlz.DataLandingZone(app,
160
+ ...
161
+ organization=dlz.DLzOrganization(
162
+ organization_id='o-0f5h921gk9',
163
+ root=dlz.RootOptions(
164
+ accounts=dlz.OrgRootAccounts(
165
+ management=dlz.DLzManagementAccount(account_id='123456789012'),
166
+ ),
167
+ ),
168
+ ous=dlz.OrgOus(
169
+ security=dlz.OrgOuSecurity(
170
+ ou_id='ou-hj29-dfhjj787i7',
171
+ accounts=dlz.OrgOuSecurityAccounts(
172
+ log=dlz.DLzManagementAccount(account_id='123456789012'),
173
+ audit=dlz.DLzManagementAccount(account_id='123456789012'),
174
+ ),
175
+ ),
176
+ workloads=dlz.OrgOuWorkloads(
177
+ ou_id='ou-h2l0-gjr36ikn',
178
+ accounts=[
179
+ dlz.DLzAccount(
180
+ name='development',
181
+ account_id='123456789012',
182
+ type=dlz.DlzAccountType.DEVELOP,
183
+ ),
184
+ dlz.DLzAccount(
185
+ name='production',
186
+ account_id='123456789012',
187
+ type=dlz.DlzAccountType.PRODUCTION,
188
+ ),
189
+
190
+ ...AS MANY ACCOUNTS AS DESIRED...
191
+ ],
192
+ ),
193
+ )
194
+ ),
195
+ )
196
+
197
+ app.synth()
198
+ ````
199
+ </Fragment>
200
+ </DualCode>
201
+
202
+
203
+
204
+
205
+