aws-data-landing-zone 0.2.4 → 0.3.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/.claude/CLAUDE.md +622 -0
- package/.claude/ROADMAP.md +353 -0
- package/.claude/settings.json +13 -0
- package/.jsii +5188 -75
- package/.nvmrc +1 -1
- package/API.md +1012 -164
- package/docs/src/content/docs/reference/api.md +1012 -164
- 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-lake-formation/dlz-lake-formation.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 +3 -3
- 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 +3 -3
- package/lib/constructs/organization-policies/service-control-policy.js +1 -1
- package/lib/constructs/organization-policies/tag-policy.js +1 -1
- package/lib/data-landing-zone-client.js +1 -1
- package/lib/data-landing-zone.js +1 -1
- package/lib/defaults.js +1 -1
- 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.js +1 -1
- 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 +6 -6
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
# Product Roadmap — Shaped Work Cycles
|
|
2
|
+
|
|
3
|
+
This document contains time-bound planning for upcoming DLZ feature cycles. Durable architectural patterns extracted from this planning are captured in [CLAUDE.md](CLAUDE.md).
|
|
4
|
+
|
|
5
|
+
When a cycle completes, archive its content and extract any new patterns into the governance document.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Cycle 1: Enterprise Security Baseline
|
|
10
|
+
|
|
11
|
+
**Status:** In progress — 2 of 7 items complete (GuardDuty, CDK+Node.js upgrade). Remaining items (Macie, per-account SCPs, ClickOps, DNS, OIDC expansion) have not started implementation.
|
|
12
|
+
|
|
13
|
+
### Problem
|
|
14
|
+
|
|
15
|
+
DLZ covers the basics well: accounts, networking, IAM, SCPs, budgets. But in an enterprise environment with hundreds of accounts across multiple regions, several gaps become blockers.
|
|
16
|
+
|
|
17
|
+
**No GuardDuty or Macie.** Threat detection and sensitive data discovery are expected in any enterprise security review. Without them, the security team will push back before anything else gets evaluated.
|
|
18
|
+
|
|
19
|
+
**SCPs are global-only.** Organizations run dev and prod accounts at different maturity levels. They need stricter controls on production without restricting development. A single global SCP list can't do this.
|
|
20
|
+
|
|
21
|
+
**No DNS management.** Multi-region, cross-account deployments need private DNS resolution. Without it, every deployment requires manual Route53 setup outside DLZ, which breaks the automation promise.
|
|
22
|
+
|
|
23
|
+
**No GitHub OIDC.** Self-service deployments need CI/CD without long-lived credentials. OIDC is the standard pattern, and enterprise clients expect it to work out of the box.
|
|
24
|
+
|
|
25
|
+
**No ClickOps detection.** If someone makes a console change across hundreds of accounts, DLZ can't surface it. Guardrails-as-code lose their meaning when manual changes go unnoticed.
|
|
26
|
+
|
|
27
|
+
**CDK pinned at 2.133.0, Node.js at end-of-life runtime.** Both show up as findings in security reviews and make the dependency posture look neglected.
|
|
28
|
+
|
|
29
|
+
These are the gaps between a landing zone that demos well and one that holds up in a real enterprise deployment.
|
|
30
|
+
|
|
31
|
+
### Appetite
|
|
32
|
+
|
|
33
|
+
Originally scoped as 3 weeks, single engineer, AI-assisted. The first 2 items (GuardDuty, CDK upgrade) are complete. The remaining 5 items may require extending the timeline or descoping some items to a later cycle.
|
|
34
|
+
|
|
35
|
+
Shaped cycle, not open-ended exploration. Every item here is a known AWS pattern with existing CDK constructs.
|
|
36
|
+
|
|
37
|
+
### Solution
|
|
38
|
+
|
|
39
|
+
#### Track 1: security baseline (week 1)
|
|
40
|
+
|
|
41
|
+
GuardDuty ([#118](https://github.com/DataChefHQ/aws-data-landing-zone/issues/118)) — **DONE**
|
|
42
|
+
|
|
43
|
+
- Enable at the organization level
|
|
44
|
+
- Delegate administrator to the security/audit account
|
|
45
|
+
- Aggregate findings into Security Hub (already supported)
|
|
46
|
+
- Configure per-account-type enablement (ties into Track 2)
|
|
47
|
+
- Route notifications through existing DLZ channels (Slack/Teams/email)
|
|
48
|
+
|
|
49
|
+
Macie ([#117](https://github.com/DataChefHQ/aws-data-landing-zone/issues/117))
|
|
50
|
+
|
|
51
|
+
- Same organizational pattern as GuardDuty: org enable, delegate admin
|
|
52
|
+
- Auto-discovery of S3 buckets with sensitive data classification
|
|
53
|
+
- Findings go to Security Hub for a unified view
|
|
54
|
+
- See CLAUDE.md "AWS organization-level security services pattern" for the implementation pattern
|
|
55
|
+
|
|
56
|
+
CDK + Node.js upgrade ([#123](https://github.com/DataChefHQ/aws-data-landing-zone/issues/123), [#124](https://github.com/DataChefHQ/aws-data-landing-zone/issues/124), [#125](https://github.com/DataChefHQ/aws-data-landing-zone/issues/125)) — **DONE**
|
|
57
|
+
|
|
58
|
+
- Bump aws-cdk-lib to current supported version
|
|
59
|
+
- Upgrade Lambda runtimes to Node.js 22
|
|
60
|
+
- Fix breaking changes, update snapshots
|
|
61
|
+
- Run the full test suite, validate in test environment
|
|
62
|
+
|
|
63
|
+
#### Track 2: governance granularity (week 2)
|
|
64
|
+
|
|
65
|
+
Per-account SCPs ([#68](https://github.com/DataChefHQ/aws-data-landing-zone/issues/68))
|
|
66
|
+
|
|
67
|
+
- Extend the configuration API to accept SCPs on individual `DLzAccount` entries
|
|
68
|
+
- Global SCPs define the mandatory baseline; per-account SCPs are additive only (cannot weaken global policies)
|
|
69
|
+
- Include `denyExpensiveActions` as a built-in SCP preset option ([#62](https://github.com/DataChefHQ/aws-data-landing-zone/issues/62))
|
|
70
|
+
- See CLAUDE.md "SCP governance model" for the architectural pattern
|
|
71
|
+
|
|
72
|
+
ClickOps Notifier ([#119](https://github.com/DataChefHQ/aws-data-landing-zone/issues/119))
|
|
73
|
+
|
|
74
|
+
- CloudTrail management events → EventBridge rule → SNS/Lambda
|
|
75
|
+
- Detect console-origin API calls (check `userAgent` for `console.amazonaws.com`)
|
|
76
|
+
- Filter out read-only actions to reduce noise
|
|
77
|
+
- Route notifications through existing DLZ notification config
|
|
78
|
+
- Detection and notification only, no remediation
|
|
79
|
+
- See CLAUDE.md "ClickOps detection pattern" for the architectural pattern
|
|
80
|
+
|
|
81
|
+
#### Track 3: networking and CI/CD (week 3)
|
|
82
|
+
|
|
83
|
+
DNS support ([#115](https://github.com/DataChefHQ/aws-data-landing-zone/issues/115))
|
|
84
|
+
|
|
85
|
+
- Route53 private hosted zones per account
|
|
86
|
+
- Cross-account DNS resolution via hosted zone associations
|
|
87
|
+
- VPC integration with existing DLZ networking constructs
|
|
88
|
+
- Private DNS only (see No-gos)
|
|
89
|
+
|
|
90
|
+
GitHub OIDC ([#116](https://github.com/DataChefHQ/aws-data-landing-zone/issues/116))
|
|
91
|
+
|
|
92
|
+
- IAM OIDC identity provider per workload account
|
|
93
|
+
- IAM role with trust policy scoped to specific repos/branches
|
|
94
|
+
- Role ARN exposed via SSM parameter for pipeline consumption
|
|
95
|
+
- One OIDC provider per account, multiple role mappings
|
|
96
|
+
|
|
97
|
+
### Rabbit holes
|
|
98
|
+
|
|
99
|
+
**DNS complexity.** Route53 has public hosted zones, complex routing policies (weighted, latency, geolocation, failover), health checks, DNSSEC, and cross-account delegation for public domains. None of that is in scope here. We're solving private DNS resolution between VPCs across accounts, the common multi-account pattern for internal service communication. Public DNS is a separate problem for a separate cycle.
|
|
100
|
+
|
|
101
|
+
**GuardDuty/Macie configuration depth.** Both services have large configuration surfaces: custom threat lists, suppression rules, automated response playbooks, classification jobs with custom identifiers. We enable org-wide with sensible defaults and route findings to Security Hub. Tuning beyond that is per-deployment work, not product scope.
|
|
102
|
+
|
|
103
|
+
**SCP inheritance.** AWS SCP inheritance across nested OUs is tricky to get right. We scope this to DLZ's existing OU structure (flat), with per-account SCP configuration rather than per-OU nesting. If someone needs deeply nested OU hierarchies with layered SCP inheritance, that's a different conversation.
|
|
104
|
+
|
|
105
|
+
**ClickOps noise.** Console activity across hundreds of accounts produces a lot of events. The notifier needs good default filters (exclude read-only calls, exclude console logins) or it turns into alert fatigue. Time should go into the filter list, not into building an event processing pipeline.
|
|
106
|
+
|
|
107
|
+
### No-gos
|
|
108
|
+
|
|
109
|
+
- Public DNS management. Different lifecycle, different risk profile.
|
|
110
|
+
- GuardDuty/Macie auto-remediation. This cycle is detection and notification only. Auto-remediation (quarantine an instance, revoke credentials) is a separate product decision.
|
|
111
|
+
- OU restructuring. We work with DLZ's existing OU model.
|
|
112
|
+
- Compliance framework mapping. Connecting GuardDuty/Macie findings to specific standards (SOC 2, ISO, GDPR) is outside DLZ's scope.
|
|
113
|
+
- Dashboard or UI. DLZ is an IaC construct. Visualization belongs in a separate layer.
|
|
114
|
+
- Build-time SCP validation ([#20](https://github.com/DataChefHQ/aws-data-landing-zone/issues/20)). Useful, but it involves CDK synthesis interception and deserves its own cycle.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Cycle 2: Scale Infrastructure
|
|
119
|
+
|
|
120
|
+
### Problem
|
|
121
|
+
|
|
122
|
+
After cycle 1, DLZ will have GuardDuty, Macie, scoped SCPs, DNS, OIDC, and up-to-date dependencies. But two things prevent that from working at scale.
|
|
123
|
+
|
|
124
|
+
**Accounts are created manually.** DLZ configures accounts after they exist, but creating them (or adopting existing ones) is a manual SOP. For an organization onboarding dozens or hundreds of accounts, this is the bottleneck. Every new account needs someone to follow a checklist, then wire it into the DLZ config, then deploy. The value of automated guardrails drops when the account creation step that precedes them is manual and error-prone.
|
|
125
|
+
|
|
126
|
+
**Logs are scattered.** Cycle 1 adds GuardDuty and Macie, which produce findings. Security Hub aggregates those findings. But the raw logs (CloudTrail events, VPC Flow Logs, DNS query logs) still live in each individual account. When someone needs to investigate an incident, they have to hop between accounts to piece together what happened. The security features from cycle 1 generate signals. Without centralized logging, acting on those signals is slow and fragmented.
|
|
127
|
+
|
|
128
|
+
**No cost data foundation.** DLZ has budget alerts, but there's no access to the underlying cost data in a queryable form. AWS Cost and Usage Reports (CUR) are the raw data source for any FinOps capability: dashboards, chargeback models, anomaly detection, optimization recommendations. Without CUR enabled and delivered to a central location, none of that is possible. DLZ enforces tagging and sets budgets, but the data those tags generate has nowhere to go.
|
|
129
|
+
|
|
130
|
+
### Appetite
|
|
131
|
+
|
|
132
|
+
The account factory has a well-defined boundary: it sits in the Global wave, creates or adopts accounts, and hands off to existing DLZ stacks for configuration. Centralized logging follows established AWS patterns (CloudTrail organization trail, VPC Flow Logs to central S3, cross-account CloudWatch). CUR enablement is a small addition that follows the same central-S3 pattern as logging. None of these require new product design. All three are implementation of known patterns within DLZ's existing deployment model.
|
|
133
|
+
|
|
134
|
+
### Solution
|
|
135
|
+
|
|
136
|
+
#### Track 1: account factory construct (weeks 1-2)
|
|
137
|
+
|
|
138
|
+
The construct handles two paths: creating new accounts and adopting existing ones.
|
|
139
|
+
|
|
140
|
+
**Create path**
|
|
141
|
+
|
|
142
|
+
- New account definition in DLZ config: name, email, type (dev/prod), OU, regions
|
|
143
|
+
- AWS Organizations `CreateAccount` API call via custom resource
|
|
144
|
+
- Poll for completion (account creation is async)
|
|
145
|
+
- Bootstrap the account for CDK deployment
|
|
146
|
+
- Hand off to existing DLZ regional waves for VPC, SCPs, GuardDuty, Macie, OIDC, DNS, budgets
|
|
147
|
+
- See CLAUDE.md "Account lifecycle pattern" for the architectural pattern
|
|
148
|
+
|
|
149
|
+
**Adopt path**
|
|
150
|
+
|
|
151
|
+
- Existing account referenced by ID in DLZ config
|
|
152
|
+
- Move account to correct OU if needed
|
|
153
|
+
- Bootstrap for CDK if not already done
|
|
154
|
+
- Same handoff to regional waves
|
|
155
|
+
|
|
156
|
+
**Placement in DLZ**
|
|
157
|
+
|
|
158
|
+
- Runs in the Global wave, before any regional stacks
|
|
159
|
+
- Account type from the config drives which SCPs, GuardDuty settings, and budget thresholds get applied downstream
|
|
160
|
+
- Outputs account ID and bootstrap status via SSM parameters
|
|
161
|
+
|
|
162
|
+
**Rate limiting and quotas**
|
|
163
|
+
|
|
164
|
+
- AWS has a default limit of 10 account creations per organization (can be increased via support ticket)
|
|
165
|
+
- `CreateAccount` is rate-limited to 5 concurrent requests
|
|
166
|
+
- The construct should batch and throttle, not fire all at once
|
|
167
|
+
- For large-scale adoption (100+ existing accounts), the adopt path should support bulk import from a list of account IDs
|
|
168
|
+
|
|
169
|
+
#### Track 2: centralized logging (weeks 2-3)
|
|
170
|
+
|
|
171
|
+
See CLAUDE.md "Centralized logging pattern" for the architectural pattern.
|
|
172
|
+
|
|
173
|
+
**Organization CloudTrail**
|
|
174
|
+
|
|
175
|
+
- Create an organization-level trail in the management account
|
|
176
|
+
- Store logs in a central S3 bucket in the log archive account
|
|
177
|
+
- Enable log file validation and encryption (KMS)
|
|
178
|
+
- This replaces the need for per-account CloudTrail setup
|
|
179
|
+
|
|
180
|
+
**VPC Flow Logs**
|
|
181
|
+
|
|
182
|
+
- Enable flow logs on all DLZ-managed VPCs
|
|
183
|
+
- Deliver to the central S3 bucket in log archive account
|
|
184
|
+
- Use Parquet format for cost-effective querying with Athena
|
|
185
|
+
- Partition by account, region, and date
|
|
186
|
+
|
|
187
|
+
**DNS query logging**
|
|
188
|
+
|
|
189
|
+
- Enable Route53 Resolver query logging on DLZ-managed VPCs
|
|
190
|
+
- Deliver to central S3 in log archive account
|
|
191
|
+
- Pairs with the DNS support added in cycle 1
|
|
192
|
+
|
|
193
|
+
**Cross-account CloudWatch**
|
|
194
|
+
|
|
195
|
+
- Set up CloudWatch cross-account observability from the management or audit account
|
|
196
|
+
- Sharing configuration deployed to each DLZ-managed account
|
|
197
|
+
- Allows centralized metric and log queries without switching accounts
|
|
198
|
+
|
|
199
|
+
**Retention and lifecycle**
|
|
200
|
+
|
|
201
|
+
- S3 lifecycle policies on the central bucket: Standard for 90 days, Glacier after 90, delete after 365 (configurable in DLZ config)
|
|
202
|
+
- CloudWatch log group retention aligned with the same policy
|
|
203
|
+
|
|
204
|
+
#### Track 3: CUR enablement (week 3)
|
|
205
|
+
|
|
206
|
+
**Cost and Usage Reports**
|
|
207
|
+
|
|
208
|
+
- Enable CUR 2.0 (the current AWS version) in the management account
|
|
209
|
+
- Deliver reports to a central S3 bucket in the log archive or a dedicated FinOps account (configurable)
|
|
210
|
+
- Parquet format for efficient querying
|
|
211
|
+
- Hourly granularity with resource-level detail
|
|
212
|
+
|
|
213
|
+
**Athena integration**
|
|
214
|
+
|
|
215
|
+
- Create a Glue database and crawler for the CUR data
|
|
216
|
+
- Pre-built Athena table definition so cost data is queryable immediately after the first report lands
|
|
217
|
+
- Partition by billing period
|
|
218
|
+
|
|
219
|
+
**What this enables downstream**
|
|
220
|
+
|
|
221
|
+
- AWS CUDOS dashboards (QuickSight) can point directly at the Athena table
|
|
222
|
+
- Third-party FinOps tools (Vantage, Kubecost, custom dashboards) consume the same CUR data from S3
|
|
223
|
+
- Chargeback models can be built on top of the tag dimensions DLZ already enforces
|
|
224
|
+
- Cost anomaly detection services (AWS Cost Anomaly Detection) can be enabled separately and will use the same underlying data
|
|
225
|
+
|
|
226
|
+
DLZ's role stops at making the data available. What gets built on top of it (dashboards, chargeback logic, optimization recommendations) is either a separate product or an engagement-specific deliverable.
|
|
227
|
+
|
|
228
|
+
### Rabbit holes
|
|
229
|
+
|
|
230
|
+
**Account email management.** Every AWS account needs a unique root email. For organizations creating many accounts, this usually means email aliases (user+account1@company.com). DLZ should accept the email in config but should not try to manage email infrastructure, validate deliverability, or set up root account MFA. Those are operational concerns outside the construct's boundary.
|
|
231
|
+
|
|
232
|
+
**Account closure and suspension.** The factory creates and adopts accounts. It does not close or suspend them. Account decommissioning has legal, data retention, and billing implications that vary by organization. That's a different feature with its own design work.
|
|
233
|
+
|
|
234
|
+
**CloudTrail Lake vs. S3.** AWS offers CloudTrail Lake as a managed query layer over CloudTrail data. It's convenient but expensive at scale. The default should be S3 with Athena for querying. CloudTrail Lake can be a future configuration option.
|
|
235
|
+
|
|
236
|
+
**Log volume at scale.** VPC Flow Logs and DNS query logs across hundreds of accounts produce a lot of data. The Parquet format and date-based partitioning help, but cost estimation for S3 storage and Athena queries should be called out in docs, not solved in the construct.
|
|
237
|
+
|
|
238
|
+
**Existing CloudTrail trails.** Most accounts already have a default CloudTrail trail. The organization trail replaces the need for per-account trails, but DLZ should not delete existing trails automatically. It should document that per-account trails can be removed after the org trail is verified.
|
|
239
|
+
|
|
240
|
+
**CUR report delay.** AWS delivers the first CUR report within 24 hours of enablement, then updates it throughout the billing period. The Athena table will be empty until that first delivery. This is normal AWS behavior, not something the construct should try to work around.
|
|
241
|
+
|
|
242
|
+
**CUR 1.0 vs 2.0.** AWS still supports the legacy CUR format but recommends CUR 2.0. We use 2.0 only. If an organization already has CUR 1.0 enabled, the construct creates a new 2.0 export alongside it. It does not migrate or delete the existing one.
|
|
243
|
+
|
|
244
|
+
### No-gos
|
|
245
|
+
|
|
246
|
+
- Account closure, suspension, or decommissioning. Create and adopt only.
|
|
247
|
+
- Root account MFA setup or email verification. Operational, not IaC.
|
|
248
|
+
- CloudTrail Lake integration. S3 + Athena is the default. Lake can come later.
|
|
249
|
+
- Log alerting or anomaly detection on centralized logs. That's an observability product concern, not a logging infrastructure concern.
|
|
250
|
+
- SIEM integration. The construct delivers logs to S3. Forwarding to Splunk, Datadog, or a SIEM is deployment-specific.
|
|
251
|
+
- Custom CloudWatch dashboards. The construct sets up cross-account access. What people put on dashboards is their business.
|
|
252
|
+
- FinOps dashboards, chargeback models, or optimization recommendations. DLZ delivers the raw CUR data. Visualization and business logic belong in a separate product or engagement-specific work.
|
|
253
|
+
- AWS Cost Anomaly Detection configuration. It's a one-click enable in the console and doesn't need IaC management. Docs can mention it as a recommended next step.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Cycle 3: Proactive Governance
|
|
258
|
+
|
|
259
|
+
### Problem
|
|
260
|
+
|
|
261
|
+
After cycles 1 and 2, DLZ will create accounts, apply scoped SCPs, enable GuardDuty/Macie, set up networking with DNS, configure OIDC, and centralize logs. The enforcement model works, but it only catches problems at deploy time or after the fact.
|
|
262
|
+
|
|
263
|
+
**SCP errors surface too late.** A malformed SCP or a policy conflict only shows up when the CDK deploy hits AWS. In a pipeline, that means a failed deployment, a rollback, and someone debugging the SCP against the AWS API error. For an organization with per-account SCPs (added in cycle 1), the number of policy combinations grows. Catching mistakes during `cdk synth`, before anything touches AWS, saves time and prevents broken rollouts.
|
|
264
|
+
|
|
265
|
+
**Data workloads have no specific controls.** DLZ's current SCPs, Config Rules, and Security Hub standards are general-purpose. Organizations running data pipelines, AI/ML workloads, or analytics platforms need controls tuned to those services: S3 bucket policies, Glue job configurations, SageMaker notebook restrictions, Redshift cluster settings. Without data-specific controls, DLZ covers the platform but leaves a gap in the workload layer it was originally designed to support.
|
|
266
|
+
|
|
267
|
+
**Test coverage has holes.** The IAM account alias custom-resource Lambda has no unit tests ([#126](https://github.com/DataChefHQ/aws-data-landing-zone/issues/126)). As DLZ grows in scope (cycles 1 and 2 add several new constructs), untested components become riskier. This cycle is a good time to close that gap before the surface area grows further.
|
|
268
|
+
|
|
269
|
+
### Appetite
|
|
270
|
+
|
|
271
|
+
2 weeks, single engineer, AI-assisted.
|
|
272
|
+
|
|
273
|
+
This cycle is smaller than the previous two. Build-time SCP validation is a focused piece of CDK synthesis work. Data-oriented controls are additive (new rules in existing patterns). Unit tests are bounded by the Lambda code that exists today.
|
|
274
|
+
|
|
275
|
+
### Solution
|
|
276
|
+
|
|
277
|
+
#### Track 1: build-time SCP validation ([#20](https://github.com/DataChefHQ/aws-data-landing-zone/issues/20))
|
|
278
|
+
|
|
279
|
+
**What it does**
|
|
280
|
+
|
|
281
|
+
- During `cdk synth`, validate all SCPs before they become CloudFormation resources
|
|
282
|
+
- Catch common errors: invalid JSON, unknown actions, conflicting deny/allow across global and per-account-type SCPs, exceeding the 5120 character SCP size limit
|
|
283
|
+
|
|
284
|
+
**How it works**
|
|
285
|
+
|
|
286
|
+
- CDK Aspects or a custom validation step that runs during synthesis
|
|
287
|
+
- Reads the SCP definitions from DLZ config
|
|
288
|
+
- Validates syntax against the IAM policy grammar
|
|
289
|
+
- Checks for conflicts between global SCPs and per-account SCPs (e.g., a global allow that a per-account deny contradicts, or vice versa)
|
|
290
|
+
- Checks total SCP size per target (AWS enforces a 5 SCP limit per target, each max 5120 characters)
|
|
291
|
+
- Fails `cdk synth` with a clear error message pointing to the problem
|
|
292
|
+
|
|
293
|
+
**What it does not do**
|
|
294
|
+
|
|
295
|
+
- It does not simulate SCP evaluation logic (what happens when a request hits multiple SCPs). That's AWS's job at runtime.
|
|
296
|
+
- It does not validate IAM policies, only SCPs. IAM policy validation is a separate concern.
|
|
297
|
+
|
|
298
|
+
#### Track 2: data-oriented security controls ([#28](https://github.com/DataChefHQ/aws-data-landing-zone/issues/28))
|
|
299
|
+
|
|
300
|
+
See CLAUDE.md "Data-oriented security controls" for the architectural pattern.
|
|
301
|
+
|
|
302
|
+
**SCPs for data services**
|
|
303
|
+
|
|
304
|
+
- Deny public S3 bucket creation (if not already covered by defaults)
|
|
305
|
+
- Deny unencrypted S3 buckets
|
|
306
|
+
- Deny Glue jobs without encryption at rest
|
|
307
|
+
- Deny SageMaker notebooks with direct internet access
|
|
308
|
+
- Deny Redshift clusters without encryption
|
|
309
|
+
- Deny EMR clusters without in-transit encryption
|
|
310
|
+
|
|
311
|
+
**Config Rules for data workloads**
|
|
312
|
+
|
|
313
|
+
- S3 bucket versioning enabled
|
|
314
|
+
- S3 bucket logging enabled
|
|
315
|
+
- S3 bucket replication configured (for production account types)
|
|
316
|
+
- Glue job bookmark configuration present
|
|
317
|
+
- Redshift cluster audit logging enabled
|
|
318
|
+
- SageMaker endpoint KMS encryption
|
|
319
|
+
|
|
320
|
+
**Security Hub standards**
|
|
321
|
+
|
|
322
|
+
- Enable the AWS Foundational Security Best Practices checks for S3, Glue, SageMaker, Redshift, EMR, Athena
|
|
323
|
+
- These checks are part of Security Hub but not all are enabled by default
|
|
324
|
+
|
|
325
|
+
**Configuration**
|
|
326
|
+
|
|
327
|
+
- Data controls are opt-in per account in DLZ config
|
|
328
|
+
- An account with `data: true` (or similar flag) on its `DLzAccount` entry gets these controls applied
|
|
329
|
+
- Accounts without the flag are unaffected
|
|
330
|
+
|
|
331
|
+
#### Track 3: test coverage ([#126](https://github.com/DataChefHQ/aws-data-landing-zone/issues/126))
|
|
332
|
+
|
|
333
|
+
- Unit tests for the IAM account alias custom-resource Lambda
|
|
334
|
+
- Cover the create, update, and delete handler paths
|
|
335
|
+
- Mock the AWS SDK calls (IAM CreateAccountAlias, DeleteAccountAlias)
|
|
336
|
+
- Test error handling: alias already exists, alias too long, API failure
|
|
337
|
+
- Add to the existing test suite and CI pipeline
|
|
338
|
+
|
|
339
|
+
### Rabbit holes
|
|
340
|
+
|
|
341
|
+
**SCP conflict detection depth.** SCPs interact in non-obvious ways when applied across nested OUs. Full conflict detection (will this request be denied or allowed given all SCPs in the path?) is an IAM Access Analyzer problem, not something to reimplement in a synth-time check. Stick to syntactic validation and size/count limits. Flag obvious contradictions (same action in both allow and deny for the same target), but don't try to model the full evaluation chain.
|
|
342
|
+
|
|
343
|
+
**Data control completeness.** AWS has dozens of data services. Trying to write controls for all of them in one cycle leads to a sprawling, half-tested ruleset. Pick the six services most commonly used in data landing zones (S3, Glue, SageMaker, Redshift, EMR, Athena) and do them well. Others can be added incrementally.
|
|
344
|
+
|
|
345
|
+
**Config Rule cost.** Each AWS Config Rule has a per-evaluation cost. Enabling many rules across many accounts adds up. The docs should note the cost implications. The construct should not try to optimize this (e.g., by batching evaluations).
|
|
346
|
+
|
|
347
|
+
### No-gos
|
|
348
|
+
|
|
349
|
+
- IAM policy validation. Only SCPs are in scope for build-time checks.
|
|
350
|
+
- SCP evaluation simulation. Synth-time checks are structural, not behavioral.
|
|
351
|
+
- Controls for non-data services. This cycle is specifically for data workload controls. General-purpose controls already exist.
|
|
352
|
+
- Custom Config Rules. We use AWS managed rules only. Custom rules require Lambda functions with their own maintenance burden.
|
|
353
|
+
- Auto-remediation for Config Rule violations. Detection only. Remediation is a separate product decision (deferred to a future RFC).
|