aws-data-landing-zone 0.3.4 → 0.4.0
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.
- package/.jsii +1356 -302
- package/API.md +982 -52
- package/CHANGELOG.md +27 -0
- package/README.md +132 -9
- package/docs/src/content/docs/reference/api.md +982 -52
- package/lib/constructs/account-chatbots/index.js +1 -1
- package/lib/constructs/dlz-budget/index.js +1 -1
- package/lib/constructs/dlz-control-tower-control/control-tower-control.js +1 -1
- package/lib/constructs/dlz-guardduty/guardduty-delegated-admin.js +1 -1
- package/lib/constructs/dlz-guardduty/guardduty-member-features.js +1 -1
- package/lib/constructs/dlz-guardduty/guardduty-org-config.js +1 -1
- package/lib/constructs/dlz-lake-formation/dlz-lake-formation.js +1 -1
- package/lib/constructs/dlz-macie/macie-delegated-admin.js +1 -1
- package/lib/constructs/dlz-macie/macie-members.js +1 -1
- package/lib/constructs/dlz-macie/macie-org-config.js +1 -1
- package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader-stack-cache.js +1 -1
- package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader.js +1 -1
- package/lib/constructs/dlz-stack/index.js +1 -1
- package/lib/constructs/dlz-vpc/dlz-account-networks.js +1 -1
- package/lib/constructs/dlz-vpc/dlz-vpc.js +1 -1
- package/lib/constructs/dlz-vpc/network-address.js +1 -1
- package/lib/constructs/iam/iam-account-alias.js +1 -1
- package/lib/constructs/iam/iam-password-policy.js +1 -1
- package/lib/constructs/iam-identity-center/iam-identity-center-group.js +1 -1
- package/lib/constructs/iam-identity-center/iam-identity-center.js +1 -1
- package/lib/constructs/iam-identity-center/identity-store-user.js +1 -1
- package/lib/constructs/organization-policies/index.d.ts +2 -0
- package/lib/constructs/organization-policies/index.js +3 -1
- package/lib/constructs/organization-policies/scp-merge.d.ts +17 -0
- package/lib/constructs/organization-policies/scp-merge.js +44 -0
- package/lib/constructs/organization-policies/scp-presets/control-tower-exemption.d.ts +7 -0
- package/lib/constructs/organization-policies/scp-presets/control-tower-exemption.js +20 -0
- package/lib/constructs/organization-policies/scp-presets/deny-actions-outside-regions.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-actions-outside-regions.js +69 -0
- package/lib/constructs/organization-policies/scp-presets/deny-backup-vault-lock.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-backup-vault-lock.js +25 -0
- package/lib/constructs/organization-policies/scp-presets/deny-bedrock-provisioned-throughput.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-bedrock-provisioned-throughput.js +26 -0
- package/lib/constructs/organization-policies/scp-presets/deny-cfn-stacks-without-standard-tags.d.ts +6 -0
- package/lib/constructs/organization-policies/scp-presets/deny-cfn-stacks-without-standard-tags.js +27 -0
- package/lib/constructs/organization-policies/scp-presets/deny-dedicated-infra-and-subscriptions.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-dedicated-infra-and-subscriptions.js +28 -0
- package/lib/constructs/organization-policies/scp-presets/deny-disabling-security-services.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-disabling-security-services.js +48 -0
- package/lib/constructs/organization-policies/scp-presets/deny-domain-registrations.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-domain-registrations.js +27 -0
- package/lib/constructs/organization-policies/scp-presets/deny-glacier-vault-lock.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-glacier-vault-lock.js +26 -0
- package/lib/constructs/organization-policies/scp-presets/deny-iam-without-permissions-boundary.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-iam-without-permissions-boundary.js +85 -0
- package/lib/constructs/organization-policies/scp-presets/deny-leaving-organization.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-leaving-organization.js +25 -0
- package/lib/constructs/organization-policies/scp-presets/deny-marketplace-subscriptions.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-marketplace-subscriptions.js +26 -0
- package/lib/constructs/organization-policies/scp-presets/deny-reserved-capacity-purchases.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-reserved-capacity-purchases.js +34 -0
- package/lib/constructs/organization-policies/scp-presets/deny-root-credentials-management-in-member-accounts.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-root-credentials-management-in-member-accounts.js +29 -0
- package/lib/constructs/organization-policies/scp-presets/deny-root-user-actions.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-root-user-actions.js +26 -0
- package/lib/constructs/organization-policies/scp-presets/deny-s3-object-lock-and-retention.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-s3-object-lock-and-retention.js +30 -0
- package/lib/constructs/organization-policies/scp-presets/deny-s3-public-access-bypass.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-s3-public-access-bypass.js +28 -0
- package/lib/constructs/organization-policies/scp-presets/deny-savings-plan-purchases.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-savings-plan-purchases.js +25 -0
- package/lib/constructs/organization-policies/scp-presets/deny-service-actions.d.ts +5 -0
- package/lib/constructs/organization-policies/scp-presets/deny-service-actions.js +23 -0
- package/lib/constructs/organization-policies/scp-presets/index.d.ts +19 -0
- package/lib/constructs/organization-policies/scp-presets/index.js +36 -0
- package/lib/constructs/organization-policies/service-control-policy.d.ts +0 -4
- package/lib/constructs/organization-policies/service-control-policy.js +2 -106
- package/lib/constructs/organization-policies/tag-policy.js +1 -1
- package/lib/data-landing-zone-client.js +1 -1
- package/lib/data-landing-zone-types.d.ts +32 -2
- package/lib/data-landing-zone-types.js +1 -1
- package/lib/data-landing-zone.js +1 -1
- package/lib/defaults.d.ts +7 -2
- package/lib/defaults.js +22 -8
- package/lib/lib/cdk-utils.js +3 -2
- package/lib/lib/report/index.js +1 -1
- package/lib/scripts/index.js +1 -1
- package/lib/stacks/organization/management/management-global-iam-identity-center-stack.js +1 -1
- package/lib/stacks/organization/management/management-global-stack.d.ts +2 -3
- package/lib/stacks/organization/management/management-global-stack.js +33 -53
- package/lib/stacks/organization/security/audit/global-stack.js +1 -1
- package/lib/stacks/organization/security/audit/regional-stack.js +1 -1
- package/lib/stacks/organization/security/log/global-stack.js +1 -1
- package/lib/stacks/organization/security/log/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/base/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/base/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/data-services-phase-1-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/data-services-phase-1-stack/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-1-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-2-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-2-stack/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-3-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-3-stack/regional-stack.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.3.4] - 2026-05-01
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
- **deps:** Upgrade dependencies
|
|
10
|
+
|
|
11
|
+
- Self mutation
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.3.3] - 2026-04-17
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **dlz-macie:** Resolved exceptions in account enrollment logic
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [0.3.2] - 2026-04-17
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- **dlz-macie:** Handled ValidationException in disenrollment process
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
- Documented changes in CHANGELOG.md to reflect recent updates
|
|
30
|
+
|
|
31
|
+
|
|
5
32
|
## [0.3.1] - 2026-04-16
|
|
6
33
|
|
|
7
34
|
### Chores
|
package/README.md
CHANGED
|
@@ -61,10 +61,28 @@ const dlz = new DataLandingZone(app, {
|
|
|
61
61
|
emails: ['you@org.com'],
|
|
62
62
|
}),
|
|
63
63
|
],
|
|
64
|
-
denyServiceList: [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
denyServiceList: ['ecs:*'],
|
|
65
|
+
// For full control over the deny-services baseline, use scpBaselineStatements
|
|
66
|
+
// instead. Cannot be combined with denyServiceList. Mandatory-tags SCP is
|
|
67
|
+
// always appended after these statements.
|
|
68
|
+
// scpBaselineStatements: [
|
|
69
|
+
// ScpDenyRootUserActions.statement(),
|
|
70
|
+
// ScpDenyLeavingOrganization.statement(),
|
|
71
|
+
// ],
|
|
72
|
+
// SCP statements applied to every workload account of a given type, layered on
|
|
73
|
+
// top of the org-wide baseline (deny-services + mandatory-tags SCP).
|
|
74
|
+
// Merge order: baseline -> account-type -> per-account. Additive only.
|
|
75
|
+
scpStatementsByAccountType: {
|
|
76
|
+
development: [
|
|
77
|
+
ScpDenyReservedCapacityPurchases.statement(),
|
|
78
|
+
ScpDenySavingsPlanPurchases.statement(),
|
|
79
|
+
],
|
|
80
|
+
production: [
|
|
81
|
+
ScpDenyDisablingSecurityServices.statement(),
|
|
82
|
+
ScpDenyRootUserActions.statement(),
|
|
83
|
+
ScpDenyLeavingOrganization.statement(),
|
|
84
|
+
],
|
|
85
|
+
},
|
|
68
86
|
guardDuty: {
|
|
69
87
|
autoEnableOrgMembers: 'NEW', // Can be ALL, NEW or NONE, Default is NONE
|
|
70
88
|
},
|
|
@@ -91,6 +109,15 @@ const dlz = new DataLandingZone(app, {
|
|
|
91
109
|
eksAuditLogs: true,
|
|
92
110
|
rdsLoginEvents: true,
|
|
93
111
|
},
|
|
112
|
+
// Per-account SCP statements layered on top of the org-wide baseline.
|
|
113
|
+
// Additive only: cannot weaken the deny-services baseline or the mandatory-tags SCP.
|
|
114
|
+
// Use the importable presets in `scp-presets/` for common controls,
|
|
115
|
+
// or write your own iam.PolicyStatement instances.
|
|
116
|
+
scpStatements: [
|
|
117
|
+
ScpDenyDisablingSecurityServices.statement(),
|
|
118
|
+
ScpDenyRootUserActions.statement(),
|
|
119
|
+
ScpDenyActionsOutsideRegions.statement(['eu-west-1', 'us-east-1']),
|
|
120
|
+
],
|
|
94
121
|
...
|
|
95
122
|
},
|
|
96
123
|
|
|
@@ -165,10 +192,28 @@ dlz.DataLandingZone(app,
|
|
|
165
192
|
emails=["you@org.com"],
|
|
166
193
|
),
|
|
167
194
|
],
|
|
168
|
-
deny_service_list=[
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
195
|
+
deny_service_list=["ecs:*"],
|
|
196
|
+
# For full control over the deny-services baseline, use scp_baseline_statements
|
|
197
|
+
# instead. Cannot be combined with deny_service_list. Mandatory-tags SCP is
|
|
198
|
+
# always appended after these statements.
|
|
199
|
+
# scp_baseline_statements=[
|
|
200
|
+
# dlz.ScpDenyRootUserActions.statement(),
|
|
201
|
+
# dlz.ScpDenyLeavingOrganization.statement(),
|
|
202
|
+
# ],
|
|
203
|
+
# SCP statements applied to every workload account of a given type, layered on
|
|
204
|
+
# top of the org-wide baseline (deny-services + mandatory-tags SCP).
|
|
205
|
+
# Merge order: baseline -> account-type -> per-account. Additive only.
|
|
206
|
+
scp_statements_by_account_type=dlz.ScpStatementsByAccountType(
|
|
207
|
+
development=[
|
|
208
|
+
dlz.ScpDenyReservedCapacityPurchases.statement(),
|
|
209
|
+
dlz.ScpDenySavingsPlanPurchases.statement(),
|
|
210
|
+
],
|
|
211
|
+
production=[
|
|
212
|
+
dlz.ScpDenyDisablingSecurityServices.statement(),
|
|
213
|
+
dlz.ScpDenyRootUserActions.statement(),
|
|
214
|
+
dlz.ScpDenyLeavingOrganization.statement(),
|
|
215
|
+
],
|
|
216
|
+
),
|
|
172
217
|
organization=dlz.DLzOrganization(
|
|
173
218
|
organization_id='o-0f5h921gk9',
|
|
174
219
|
root=dlz.RootOptions(
|
|
@@ -201,7 +246,16 @@ dlz.DataLandingZone(app,
|
|
|
201
246
|
rds_login_events=False,
|
|
202
247
|
lambda_network_logs=False,
|
|
203
248
|
runtime_monitoring=False,
|
|
204
|
-
)
|
|
249
|
+
),
|
|
250
|
+
# Per-account SCP statements layered on top of the org-wide baseline.
|
|
251
|
+
# Additive only: cannot weaken the deny-services baseline or the mandatory-tags SCP.
|
|
252
|
+
# Use the importable presets in `scp-presets/` for common controls,
|
|
253
|
+
# or write your own iam.PolicyStatement instances.
|
|
254
|
+
scp_statements=[
|
|
255
|
+
dlz.ScpDenyDisablingSecurityServices.statement(),
|
|
256
|
+
dlz.ScpDenyRootUserActions.statement(),
|
|
257
|
+
dlz.ScpDenyActionsOutsideRegions.statement(['eu-west-1', 'us-east-1']),
|
|
258
|
+
],
|
|
205
259
|
),
|
|
206
260
|
],
|
|
207
261
|
),
|
|
@@ -301,6 +355,75 @@ The DLZ adheres to the following principles:
|
|
|
301
355
|
- Create **Tags** and specify their permissions for use within the same account and when sharing to other accounts.
|
|
302
356
|
- Optionally, set **Tag Permissions** on Tags. This is usually out of scope for DLZ, but can be configured.
|
|
303
357
|
|
|
358
|
+
## Service Control Policy presets
|
|
359
|
+
|
|
360
|
+
DLZ ships a library of importable SCP presets under `src/constructs/organization-policies/scp-presets/` that you can attach to any account via `DLzAccount.scpStatements`, or to every account of a given type via `DataLandingZoneProps.scpStatementsByAccountType`. Each preset is one file, one class, one `static statement()` method.
|
|
361
|
+
|
|
362
|
+
Statements are merged additively in the order: org-wide baseline → per-account-type → per-account. Deeper tiers can add deny rules but cannot weaken broader tiers.
|
|
363
|
+
|
|
364
|
+
TypeScript:
|
|
365
|
+
|
|
366
|
+
```ts
|
|
367
|
+
scpStatementsByAccountType: {
|
|
368
|
+
production: [
|
|
369
|
+
ScpDenyDisablingSecurityServices.statement(),
|
|
370
|
+
ScpDenyRootUserActions.statement(),
|
|
371
|
+
],
|
|
372
|
+
development: [
|
|
373
|
+
ScpDenyReservedCapacityPurchases.statement(),
|
|
374
|
+
],
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Python:
|
|
379
|
+
|
|
380
|
+
```python
|
|
381
|
+
scp_statements_by_account_type=dlz.ScpStatementsByAccountType(
|
|
382
|
+
production=[
|
|
383
|
+
dlz.ScpDenyDisablingSecurityServices.statement(),
|
|
384
|
+
dlz.ScpDenyRootUserActions.statement(),
|
|
385
|
+
],
|
|
386
|
+
development=[
|
|
387
|
+
dlz.ScpDenyReservedCapacityPurchases.statement(),
|
|
388
|
+
],
|
|
389
|
+
)
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Risk legend:**
|
|
393
|
+
- 🟢 Low risk — typically safe to attach as-is.
|
|
394
|
+
- 🟡 Medium risk — has a common gotcha; read the `@remarks` before attaching.
|
|
395
|
+
- 🔴 High risk — easy to break legitimate workloads; attach only after deliberate review and a break-glass plan.
|
|
396
|
+
|
|
397
|
+
**Foundation presets** (used internally by DLZ to build the org-wide baseline; importable for custom stacks):
|
|
398
|
+
|
|
399
|
+
| Preset | What it denies | Risk |
|
|
400
|
+
|---|---|---|
|
|
401
|
+
| `ScpDenyServiceActions(serviceActions)` | A caller-supplied list of service actions across all resources. Backs `DataLandingZoneProps.denyServiceList` (and the default deny-services portion of `scpBaselineStatements`). | 🟢 |
|
|
402
|
+
| `ScpDenyCfnStacksWithoutStandardTags(tags)` | `cloudformation:CreateStack` unless every required tag is present. Backs the mandatory-tags SCP. | 🟡 |
|
|
403
|
+
| `ScpDenyIamWithoutPermissionsBoundary` | Creating/modifying IAM users or roles unless the `IamPolicyPermissionBoundaryPolicy` boundary is attached (4 statements). Pairs with `iamPolicyPermissionBoundary` prop. | 🟡 |
|
|
404
|
+
|
|
405
|
+
**Opt-in CCoE presets** (attach to `DLzAccount.scpStatements` as needed):
|
|
406
|
+
|
|
407
|
+
| Preset | What it denies | Risk |
|
|
408
|
+
|---|---|---|
|
|
409
|
+
| `ScpDenyLeavingOrganization` | `organizations:LeaveOrganization` from the member account. | 🟢 |
|
|
410
|
+
| `ScpDenyRootCredentialsManagementInMemberAccounts` | Direct member-account root use, while permitting AWS-Organizations centralized root sessions (`aws:AssumedRoot`). | 🟢 |
|
|
411
|
+
| `ScpDenyBedrockProvisionedThroughput` | Creation/modification of Bedrock provisioned model throughput (committed capacity). On-demand inference still works. | 🟢 |
|
|
412
|
+
| `ScpDenyDedicatedInfraAndSubscriptions` | Outposts, Snowball clusters, Shield Advanced subscriptions, and ACM Private CA. | 🟢 |
|
|
413
|
+
| `ScpDenyRootUserActions` | All actions performed by the account root user. | 🟡 |
|
|
414
|
+
| `ScpDenySavingsPlanPurchases` | Creation of Savings Plans (1- or 3-year compute spend commitments). | 🟡 |
|
|
415
|
+
| `ScpDenyReservedCapacityPurchases` | Reserved Instance and reserved-capacity purchases across EC2/RDS/DynamoDB/ElastiCache/Redshift/OpenSearch. | 🟡 |
|
|
416
|
+
| `ScpDenyMarketplaceSubscriptions` | AWS Marketplace product subscriptions and agreement-approval acceptance. | 🟡 |
|
|
417
|
+
| `ScpDenyDomainRegistrations` | Route 53 domain registrations, **renewals**, and transfers. | 🟡 |
|
|
418
|
+
| `ScpDenyS3PublicAccessBypass` | Disabling or removing S3 Block Public Access at the account or bucket level. | 🟡 |
|
|
419
|
+
| `ScpDenyDisablingSecurityServices` | Disabling/deleting CloudTrail, AWS Config, GuardDuty, Security Hub, or Macie. Only `AWSControlTowerExecution` is exempted. | 🟡 |
|
|
420
|
+
| `ScpDenyS3ObjectLockAndRetention` | S3 (and S3 Object Lambda) object retention, legal-hold, governance bypass, and bucket Object Lock configuration. **Also blocks legitimate WORM/compliance use.** | 🔴 |
|
|
421
|
+
| `ScpDenyGlacierVaultLock` | Initiating or completing a Glacier Vault Lock policy. **Also blocks compliance immutability.** | 🔴 |
|
|
422
|
+
| `ScpDenyBackupVaultLock` | Enabling AWS Backup Vault Lock. **Also blocks ransomware-resistant backups.** | 🔴 |
|
|
423
|
+
| `ScpDenyActionsOutsideRegions(allowedRegions)` | All regional API calls outside an explicit allow-list, exempting AWS global services. **Highest blast radius — a wrong region list denies every regional API call.** | 🔴 |
|
|
424
|
+
|
|
425
|
+
> **Note on the AWS 5120-byte SCP body limit:** combining all 15 presets at once exceeds the quota by a few hundred bytes. Pick a subset; `ScpDenyActionsOutsideRegions` alone is ~1500 bytes. The merge step (`ScpMerge.validate`) catches over-budget combinations at synth time.
|
|
426
|
+
|
|
304
427
|
## How it works
|
|
305
428
|
|
|
306
429
|
The DLZ defines all accounts and resources in a single CDK construct that can be used in Typescript or Python CDK
|