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,130 @@
1
+ ---
2
+ title: Tagging
3
+ description: Tagging
4
+ ---
5
+ import DualCode from '../../../../components/DualCode.astro';
6
+
7
+ The Data Landing Zone implements a mandatory tagging strategy across all accounts and resources.
8
+ This ensures that resource costs can be tracked and the responsible creators can be identified.
9
+
10
+ The following AWS services are utilized to enforce an effective tagging strategy:
11
+ 1. An AWS Organization Tag Policy at the account level.
12
+ 2. A Service Control Policy (SCP) at the account level, which enforces that all CloudFormation (CFN) Stacks
13
+ must include these tags upon creation.
14
+ 3. An AWS Config rule that checks for these tags on supported resources. While the rule does not support all
15
+ resources, it ensures that key resources, such as `AWS::CloudFormation::Stack`, will inherently apply tags
16
+ to the resources they create. For more information, refer to the config rule [required-tags](https://docs.aws.amazon.com/config/latest/developerguide/required-tags.html).
17
+
18
+ :::note
19
+ It is not possible to enforce tags on all resources universally. The strategy outlined here represents
20
+ the best possible effort. The Config Rule will report any untagged resources to Security Hub, where they
21
+ can be tracked. It is then necessary to identify the responsible party and ensure the tags are applied
22
+ to the resources.
23
+ :::
24
+
25
+ ## Default Mandatory Tags
26
+
27
+ The mandatory tags all begin with a capital letter, but the underlying code property is lowercase. The mandatory tags include:
28
+ - `Owner` - Identifies the team or individual responsible for the resource.
29
+ - `Project` - Specifies the project to which the resource belongs.
30
+ - `Environment` - Defines the environment of the resource, such as `development`, `staging`, or `production`.
31
+
32
+ The DLZ construct will automatically apply the following tags to all resources it creates:
33
+ - `Owner`: `infra`
34
+ - `Project`: `dlz`
35
+ - `Environment`: `dlz`
36
+
37
+ These tag values can be customized by providing an array of values for each tag in `mandatoryTags`.
38
+ Note that while the code property is lowercase, the tags created will follow the capitalized format outlined above.
39
+
40
+ <DualCode>
41
+ <Fragment slot="ts">
42
+ ```ts
43
+ import {App} from 'aws-cdk-lib';
44
+ import { DataLandingZone } from 'aws-data-landing-zone';
45
+
46
+ const app = new App();
47
+ const dlz = new DataLandingZone(app, {
48
+ mandatoryTags: {
49
+ owner: ['backend'],
50
+ project: ['project1'],
51
+ environment: ['development', 'staging', 'production'],
52
+ },
53
+ ...
54
+ });
55
+ ```
56
+ </Fragment>
57
+ <Fragment slot="python">
58
+ ```python
59
+ #!/usr/bin/env python3
60
+ import aws_cdk as cdk
61
+ import aws_data_landing_zone as dlz
62
+
63
+ app = cdk.App()
64
+ dlz.DataLandingZone(app,
65
+ mandatory_tags={
66
+ "owner": ["backend"],
67
+ "project": ["project1"],
68
+ "environment": ["development", "staging", "production"],
69
+ },
70
+ ...
71
+ )
72
+ app.synth()
73
+ ```
74
+ </Fragment>
75
+ </DualCode>
76
+
77
+ ## Additional Mandatory Tags
78
+
79
+ Additional mandatory tags can be added to the Data Landing Zone construct by specifying the `additionalMandatoryTags`
80
+ property.
81
+
82
+ <DualCode>
83
+ <Fragment slot="ts">
84
+ ```ts
85
+ import {App} from 'aws-cdk-lib';
86
+ import { DataLandingZone } from 'aws-data-landing-zone';
87
+
88
+ const app = new App();
89
+ const dlz = new DataLandingZone(app, {
90
+ additionalMandatoryTags: [
91
+ {
92
+ name: 'cost-center',
93
+ values: ['test']
94
+ },
95
+ ],
96
+ ...
97
+ });
98
+ ```
99
+ </Fragment>
100
+ <Fragment slot="python">
101
+ ```python
102
+ #!/usr/bin/env python3
103
+ import aws_cdk as cdk
104
+ import aws_data_landing_zone as dlz
105
+
106
+ app = cdk.App()
107
+ dlz.DataLandingZone(app,
108
+ additional_mandatory_tags=[
109
+ dlz.DlzTag(
110
+ name='cost-center',
111
+ values=['test']
112
+ )
113
+ ],
114
+ ...
115
+ )
116
+ app.synth()
117
+ ```
118
+ </Fragment>
119
+ </DualCode>
120
+
121
+ ## Activate Cost Allocation Tags
122
+
123
+ To activate Cost Allocation Tags, you need to either locally run the `configureCostAllocationTags` script, as
124
+ outlined in [Scripts and Commands](/reference/scripts-commands), or enable them through the AWS Management Console.
125
+ This step is essential for utilizing tags in AWS Cost Explorer and applying them as filters when setting up AWS Budgets.
126
+
127
+ ## API References
128
+ - [MandatoryTags](/reference/api#mandatorytags)
129
+ - [DataLandingZoneProps.additionalMandatoryTags](/reference/api#aws-data-landing-zone.DataLandingZoneProps.property.additionalMandatoryTags)
130
+ - [DlzTag](/reference/api#dlztag)
@@ -7,9 +7,6 @@ import DualCode from '../../../../components/DualCode.astro';
7
7
  The Data Landing Zone (DLZ) construct offers built-in support to streamline authentication between AWS and CI/CD
8
8
  systems, enhancing security and simplifying setup processes.
9
9
 
10
- Relevant API References:
11
- - [DeploymentPlatform](/reference/api#deploymentplatform)
12
-
13
10
  ## GitHub Actions
14
11
 
15
12
  DLZ facilitates seamless integration with GitHub Actions using OpenID Connect (OIDC). OIDC is recommended over
@@ -97,10 +94,6 @@ arn:aws:iam::YOUR_MANAGEMENT_ACCOUNT_ID:role/dlz-global-git-hub-deploy-role
97
94
 
98
95
  ----
99
96
 
100
- Relevant API References:
101
- - [DeploymentPlatformGitHub](/reference/api#deploymentplatformgithub--1)
102
- - [GitHubReference](/reference/api#githubreference)
103
-
104
97
  ### 2. Use within GitHub workflows
105
98
 
106
99
  The GitHub workflow for the given repository can now be updated to use the OIDC role ARN.
@@ -333,4 +326,10 @@ jobs:
333
326
  - name: CDK deploy
334
327
  run: npm run cdk -- deploy '${{ inputs.stack_selection }}' --require-approval never --concurrency 10 --exclusively --app ./cloud_assembly_output
335
328
  ```
336
- </details>
329
+ </details>
330
+
331
+ ## API References
332
+
333
+ - [DeploymentPlatform](/reference/api#deploymentplatform)
334
+ - [DeploymentPlatformGitHub](/reference/api#deploymentplatformgithub--1)
335
+ - [GitHubReference](/reference/api#githubreference)
@@ -1,42 +1,28 @@
1
1
  ---
2
2
  title: Getting Started
3
- description: Step-by-step guide to configuring and deploying the AWS Data Landing Zone
3
+ description: Step-by-step guide to configuring and deploying the Data Landing Zone
4
4
  ---
5
5
 
6
6
  import DualCode from "../../components/DualCode.astro";
7
7
 
8
- :::caution
9
- WIP: This part is still under development.
10
- :::
8
+ This guide provides a step-by-step walkthrough for configuring and deploying the **Data Landing Zone** (DLZ). The DLZ
9
+ streamlines the setup of a secure, scalable, and well-architected multi-account AWS environment. Let’s get started!
11
10
 
12
- This guide will walk you through the process of configuring and deploying the
13
- **AWS Data Landing Zone**. The landing zone simplifies the setup of a secure,
14
- scalable, and well-architected multi-account AWS environment. Let’s get started!
11
+ ## Quick Start
15
12
 
16
- ---
17
-
18
- ## Prerequisites
13
+ ### Prerequisites
19
14
 
20
- Before you begin, ensure you have the following tools installed and configured:
15
+ Before starting, ensure you have the following tools installed and configured:
21
16
 
22
- - **AWS CLI**: Installed and configured with credentials. Ensure you have
23
- an **SSO User** or **IAM User** in the **management account** with
24
- **admin access** or the necessary permissions to assume CDK roles
25
- and perform deployments.
26
- - **Node.js**: Version 14 or higher.
17
+ - **AWS CLI**: Installed and configured with credentials. Use an **SSO User** or **IAM User** in the **management
18
+ account** with admin access or permissions to assume CDK roles and perform deployments. Ensure the AWS profile is
19
+ properly configured in your `~/.aws` config files.
20
+ - **Node.js**: Version 18 or higher.
27
21
  - **AWS CDK**: Installed globally using `npm install -g aws-cdk`.
28
- - **Git**: For cloning repositories.
29
-
30
- Additionally, if you plan to use the TypeScript scripts included with
31
- the project, you can use the **profile name** for your AWS CLI
32
- configuration that is specified in the `localProfile` property of the
33
- project configuration file.
34
-
35
- ---
36
22
 
37
- ## Step 1: Create a New CDK Project
23
+ ### Step 1: Create a New CDK Project
38
24
 
39
- To get started, create a new AWS CDK project:
25
+ Begin by creating a new AWS CDK project:
40
26
 
41
27
  <DualCode>
42
28
  <Fragment slot="ts">
@@ -45,7 +31,6 @@ To get started, create a new AWS CDK project:
45
31
  cd my-data-landing-zone
46
32
  cdk init app --language=typescript
47
33
  ```
48
-
49
34
  </Fragment>
50
35
  <Fragment slot="python">
51
36
  ```bash
@@ -53,135 +38,130 @@ To get started, create a new AWS CDK project:
53
38
  cd my-data-landing-zone
54
39
  cdk init app --language=python
55
40
  ```
56
-
57
41
  </Fragment>
58
42
  </DualCode>
59
43
 
60
- This initializes a new CDK project with the necessary files and folder structure.
61
-
62
- ---
63
-
64
- ## Step 2: Add the DataChef AWS Data Landing Zone Package
44
+ ### Step 2: Install the package
65
45
 
66
- Add the **DataChef** Data Landing Zone as a dependency to your project:
46
+ Install the AWS Data Landing Zone package:
67
47
 
68
48
  <DualCode>
69
49
  <Fragment slot="ts">
70
50
  ```bash
71
51
  npm install aws-data-landing-zone
72
52
  ```
73
-
74
53
  </Fragment>
75
54
  <Fragment slot="python">
76
55
  ```bash
77
56
  pip install aws-data-landing-zone
78
57
  ```
79
-
80
58
  </Fragment>
81
59
  </DualCode>
82
60
 
83
- ---
61
+ ### Step 3: Create the Configuration
84
62
 
85
- ## Step 3: Configuration
63
+ Define the basic configuration parameters for the DLZ. It is recommended to create this configuration in a separate file,
64
+ such as `config.ts` or `config.py`, as it will be used by both CDK and local scripts.
86
65
 
87
- Now you need to config the basic parameters required for deploying DLZ.
66
+ Refer to the example projects for guidance:
67
+ - [DLZ TypeScript Example Repository](https://github.com/DataChefHQ/aws-data-landing-zone-example-typescript)
68
+ - [DLZ Python Example Repository](https://github.com/DataChefHQ/aws-data-landing-zone-example-python)
88
69
 
89
- **NOTE:** Make sure to replace all of the IDs with correct IDs related to your AWS
90
- accounts.
70
+ The configuration requires the following:
71
+
72
+ 1. **Control Tower**: Ensure Control Tower is already set up. For details, see
73
+ [SOP - Control Tower Setup](/components/account-management/sop-initial-control-tower-setup).
74
+ 2. **Local Profile**: Specify the AWS profile for local scripts like deploy and bootstrap.
75
+ See [Scripts and Commands](/reference/scripts-commands) for more details.
76
+ 3. **Regions**: Define the global and regional AWS regions. The global(home) region is where Control Tower is deployed,
77
+ while the regional regions are additional managed regions. See [Regions](/components/account-management/regions)
78
+ for more information.
79
+ 4. **Mandatory Tags**: Specify the mandatory tag values required for resources. Refer to
80
+ [Tagging](/components/account-management/tagging) for details.
81
+ 5. **AWS Organization**: Provide details about your AWS Organization, including the Organization ID, OU IDs, and
82
+ Account IDs. Copy the IDs of accounts created by Control Tower, such as the management, security log, and security
83
+ audit accounts. Additional accounts can be created manually or moved under the Workloads OU. For more details, see
84
+ [AWS Organization](/components/account-management/aws-organization). In the code snippet below, we define a single
85
+ development account.
91
86
 
92
87
  <DualCode>
93
88
  <Fragment slot="ts">
94
- - For a complete example check [DLZ TypeScript Sample](https://github.com/DataChefHQ/aws-data-landing-zone-example-typescript).
95
89
  ```ts
90
+ // bin/config.ts
96
91
  export const config: DataLandingZoneProps = {
97
- localProfile: '', // TODO: Not required; Will be optional from next release
98
- regions: {
99
- global: Region.EU_WEST_1,
100
- regional: [Region.US_EAST_1],
101
- },
102
- mandatoryTags: {
103
- owner: ['backend'],
104
- project: ['accounting'],
105
- environment: ['development', 'staging', 'production'],
106
- },
107
- budgets: [
108
- ...Defaults.budgets(100, 20, {}),
109
- ],
110
- securityHubNotifications: [
111
- ],
112
- organization: {
113
- organizationId: 'RootOrganizationID',
114
- root: {
115
- accounts: {
116
- management: {
117
- accountId: 'YourRootAccountID',
118
- },
119
- },
120
- controls: [],
92
+ localProfile: 'YourAwsProfile',
93
+ regions: {
94
+ global: Region.CHOOSE_A_GLOBAL_REGION,
95
+ regional: [Region.CHOOSE_ONE_OR_MORE_ADDITIONAL_REGIONS],
96
+ },
97
+ mandatoryTags: {
98
+ owner: ['ALLOWED_VALUES'],
99
+ project: ['ALLOWED_VALUES'],
100
+ environment: ['ALLOWED_VALUES'],
121
101
  },
122
- ous: {
123
- security: {
124
- ouId: 'SecurityOrganizationUnitId',
102
+ budgets: [
103
+ ...Defaults.budgets(100, 20, {}),
104
+ ],
105
+ securityHubNotifications: [
106
+ ],
107
+ organization: {
108
+ organizationId: 'OrganizationID',
109
+ root: {
125
110
  accounts: {
126
- log: {
127
- accountId: 'YourLogsAccountID',
128
- },
129
- audit: {
130
- accountId: 'YourAuditAccountID',
111
+ management: {
112
+ accountId: 'YourRootAccountID',
131
113
  },
132
114
  },
115
+ controls: [],
133
116
  },
134
- workloads: {
135
- ouId: 'WorkloadOrganizationUnitId',
136
- accounts: [
137
- {
138
- name: 'development',
139
- accountId: 'YourDevelopmentAccountID',
140
- type: DlzAccountType.DEVELOP,
117
+ ous: {
118
+ security: {
119
+ ouId: 'SecurityOrganizationUnitId',
120
+ accounts: {
121
+ log: {
122
+ accountId: 'YourLogsAccountID',
123
+ },
124
+ audit: {
125
+ accountId: 'YourAuditAccountID',
126
+ },
141
127
  },
142
- ],
143
- },
144
- suspended: {
145
- ouId: 'SuspendedOrganizationUnitId',
146
- },
147
- },
148
- },
149
- deploymentPlatform: {
150
- gitHub: {
151
- references: [
152
- {
153
- owner: 'DataChefHQ',
154
- repo: 'data-landing-zone-example-typescript',
155
128
  },
156
- ],
129
+ workloads: {
130
+ ouId: 'WorkloadOrganizationUnitId',
131
+ accounts: [
132
+ {
133
+ name: 'development',
134
+ accountId: 'YourDevelopmentAccountID',
135
+ type: DlzAccountType.DEVELOP,
136
+ },
137
+ ],
138
+ },
139
+ suspended: {
140
+ ouId: 'SuspendedOrganizationUnitId',
141
+ },
142
+ },
157
143
  },
158
- },
159
-
160
- };
161
-
162
- ````
163
-
164
-
144
+ };
145
+ ```
165
146
  </Fragment>
166
147
  <Fragment slot="python">
167
- - For a complete example check [DLZ Python Sample](https://github.com/DataChefHQ/aws-data-landing-zone-example-python).
168
148
  ```python
169
- DataLandingZone(
170
- app,
171
- local_profile="", # TODO: Not required; Will be optional from next release
149
+ # my_data_landing_zone/config.py
150
+ config = DataLandingZoneProps(
151
+ local_profile="YourAwsProfile",
172
152
  regions={
173
- "global": Region.EU_WEST_1,
174
- "regional": [Region.US_EAST_1],
153
+ "global": Region.CHOOSE_A_GLOBAL_REGION,
154
+ "regional": [Region.CHOOSE_ONE_OR_MORE_ADDITIONAL_REGIONS],
175
155
  },
176
156
  mandatory_tags={
177
- "owner": ["backend"],
178
- "project": ["accounting"],
179
- "environment": ["development", "staging", "production"],
157
+ "owner": ["ALLOWED_VALUES"],
158
+ "project": ["ALLOWED_VALUES"],
159
+ "environment": ["ALLOWED_VALUES"],
180
160
  },
181
161
  budgets=Defaults.budgets(100, 20),
182
162
  security_hub_notifications=[],
183
163
  organization={
184
- "organization_id": "RootOrganizationID",
164
+ "organization_id": "OrganizationID",
185
165
  "root": {
186
166
  "accounts": {
187
167
  "management": {
@@ -218,85 +198,133 @@ accounts.
218
198
  },
219
199
  )
220
200
  ```
221
-
222
201
  </Fragment>
223
202
  </DualCode>
224
203
 
225
- ---
226
204
 
227
- ## Step 4: Add the Landing Zone to Your CDK Stack
205
+ ### Step 4: Use the Configuration in CDK
228
206
 
229
- Now you need to call the Landing Zone constructs from your CDK stacks.
207
+ Pass the configuration to the Data Landing Zone construct. This will create the necessary stacks in the appropriate
208
+ AWS accounts and regions. For more information, see [Deployment Order](/components/build-system/deployment-order).
230
209
 
231
210
  <DualCode>
232
211
  <Fragment slot="ts">
233
- In your `lib/my-data-landing-zone-stack.ts` file, add the Data Landing Zone construct:
234
212
  ```ts
213
+ // bin/my-data-landing-zone.ts
235
214
  import {App} from 'aws-cdk-lib';
236
- import {config} from "./minimum_config";
237
- import * as sns from 'aws-cdk-lib/aws-sns';
238
- import { DataLandingZone } from '@DataChefHQ/data-landing-zone';
215
+ import {config} from "./config";
216
+ import { DataLandingZone } from 'aws-data-landing-zone';
239
217
 
240
218
  const app = new App();
241
219
  const dlz = new DataLandingZone(app, config)
242
-
243
- ````
244
-
220
+ ```
245
221
  </Fragment>
246
222
  <Fragment slot="python">
247
- In your `main.py` file, add the Data Landing Zone construct:
248
223
  ```python
249
- import aws_cdk as cdk
250
- from aws_data_landing_zone import (
251
- Defaults,
252
- DlzAccountType,
253
- Region,
254
- DataLandingZone,
255
- )
256
-
257
- app = cdk.App()
258
-
259
- DataLandingZone(
260
- app,
261
- ... # your config parameters
262
- )
263
-
264
- app.synth()
265
- ```
224
+ // app.py
225
+ import aws_cdk as cdk
226
+ from aws_data_landing_zone import ( DataLandingZone )
227
+ from my_data_landing_zone.config import config
266
228
 
229
+ app = cdk.App()
230
+ DataLandingZone(app, config)
231
+ ```
267
232
  </Fragment>
268
233
  </DualCode>
269
234
 
270
- ---
235
+ ### Step 5: Bootstrap Accounts
271
236
 
272
- ## Step 5: Deploy the Landing Zone
237
+ All accounts and regions need to be CDK bootstrapped before deploying.
273
238
 
274
- ### 5.1 Bootstrap the Environment
239
+ The DLZ provides utility functions that abstract the complexity of common tasks such as bootstrapping accounts across
240
+ regions, running CDK diff or deploy commands, setting cost allocation tags, and more.
275
241
 
276
- Bootstrap your environment to prepare it for CDK deployments:
242
+ Use the `bootstrapAll` script or perform the process manually using bash and AWS CDK commands.
243
+ See [Scripts and Commands](/reference/scripts-commands) for more details.
277
244
 
278
- ```bash
279
- cdk bootstrap aws://ACCOUNT_ID/REGION
245
+ Let's use the scripts. Create a standalone script file (e.g., `scripts/bootstrap.ts` or `scripts/bootstrap.py`) to handle bootstrapping.
246
+ The script uses the configuration file to identify the accounts and regions requiring bootstrap. This is why the
247
+ configuration file is standalone file, to be shared between the CDK and the scripts.
280
248
 
281
- ```
249
+ <DualCode>
250
+ <Fragment slot="ts">
251
+ ```ts
252
+ // scripts/bootstrap.ts
253
+ import { Scripts } from "aws-data-landing-zone";
254
+ import { config } from "../bin/config";
282
255
 
283
- ### 5.2 Deploy the Stacks
256
+ (async () => {
257
+ await (new Scripts()).boostrapAll(config);
258
+ })();
259
+ ```
284
260
 
285
- Deploy the stack you created:
261
+ Then run the script:
262
+ ```bash
263
+ npx ts-node --prefer-ts-exts scripts/bootstrap.ts
264
+ ```
265
+ </Fragment>
266
+ <Fragment slot="python">
267
+ ```python
268
+ // scripts/bootstrap.py
269
+ from aws_data_landing_zone import Scripts
270
+ from data_landing_zone_example_python.config_minimum import config
286
271
 
287
- ```bash
288
- cdk deploy
272
+ scripts = Scripts()
273
+ scripts.bootstrap_all(props=config)
274
+ ```
289
275
 
290
- ```
276
+ Then run the script:
277
+ ```bash
278
+ python scripts/bootstrap.py
279
+ ```
280
+ </Fragment>
281
+ </DualCode>
291
282
 
292
- ### 5.3 Verify Deployment
283
+ ### Step 6: Deploy
293
284
 
294
- Once deployment completes, verify the resources in the AWS Management Console.
285
+ Similar to the `bootstrapAll` script, a `deployAll`(`deploy_all`) script is also available.
295
286
 
296
- ---
287
+ <DualCode>
288
+ <Fragment slot="ts">
289
+ ```ts
290
+ // scripts/deploy_all.ts
291
+ import { Scripts } from "aws-data-landing-zone";
292
+ import { config } from "../bin/config";
293
+
294
+ (async () => {
295
+ await (new Scripts()).deployAll(config);
296
+ })();
297
+ ```
298
+
299
+ Then run the script:
300
+ ```bash
301
+ npx ts-node --prefer-ts-exts scripts/deploy_all.ts
302
+ ```
303
+ </Fragment>
304
+ <Fragment slot="python">
305
+ ```python
306
+ // scripts/deploy_all.py
307
+ from aws_data_landing_zone import Scripts
308
+ from data_landing_zone_example_python.config_minimum import config
309
+
310
+ scripts = Scripts()
311
+ scripts.deploy_all(props=config)
312
+ ```
313
+
314
+ Then run the script:
315
+ ```bash
316
+ python scripts/deploy_all.py
317
+ ```
318
+ </Fragment>
319
+ </DualCode>
320
+
321
+ Alternatively deploy the CDK application with the following command:
322
+ ```bash
323
+ cdk deploy "**" --require-approval never --progress events --concurrency 10 --profile YourAwsProfile
324
+ ```
297
325
 
298
326
  ## Next Steps
299
327
 
300
- - Explore the documentation to learn more about advanced configurations.
301
- - Customize the stacks to meet your specific organizational needs.
302
- - Add additional controls or policies as required.
328
+ This guide covers the minimal setup required to get started. At this stage, only a few resources are deployed. Explore
329
+ the documentation to learn about advanced configurations and features, such as creating non-overlapping VPCs, bastions,
330
+ NAT gateways, Lake Formation setups and many more.
@@ -91,7 +91,7 @@ approvals in production environments.
91
91
  <Fragment slot="ts">
92
92
  ```ts
93
93
  import {App} from 'aws-cdk-lib';
94
- import { DataLandingZone } from '@DataChefHQ/data-landing-zone';
94
+ import { DataLandingZone } from 'aws-data-landing-zone';
95
95
 
96
96
  const app = new App();
97
97
  const dlz = new DataLandingZone(app, {
@@ -132,7 +132,7 @@ approvals in production environments.
132
132
  ```python
133
133
  #!/usr/bin/env python3
134
134
  import aws_cdk as cdk
135
- import recipes_dlz as dlz
135
+ import aws_data_landing_zone as dlz
136
136
 
137
137
  app = cdk.App()
138
138
  dlz.DataLandingZone(app,
@@ -169,7 +169,6 @@ approvals in production environments.
169
169
  )
170
170
 
171
171
  app.synth()
172
-
173
172
  ````
174
173
 
175
174
  </Fragment>
@@ -236,7 +235,7 @@ all subnets, to the private subnets in the `production` account's VPC in the `eu
236
235
  <Fragment slot="ts">
237
236
  ```ts {54-57}
238
237
  import {App} from 'aws-cdk-lib';
239
- import { DataLandingZone } from '@DataChefHQ/data-landing-zone';
238
+ import { DataLandingZone } from 'aws-data-landing-zone';
240
239
 
241
240
  const app = new App();
242
241
  const dlz = new DataLandingZone(app, {
@@ -303,7 +302,7 @@ all subnets, to the private subnets in the `production` account's VPC in the `eu
303
302
  ```python {80-85}
304
303
  #!/usr/bin/env python3
305
304
  import aws_cdk as cdk
306
- import recipes_dlz as dlz
305
+ import aws_data_landing_zone as dlz
307
306
 
308
307
  app = cdk.App()
309
308
  dlz.DataLandingZone(app,