aws-data-landing-zone 0.0.41 → 0.0.43
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 +3 -3
- package/README.md +0 -1
- package/docs/astro.config.ts +63 -50
- package/docs/public/favicon.png +0 -0
- package/docs/src/content/docs/components/account-management/accounts.mdx +1 -4
- package/docs/src/content/docs/components/account-management/budgets.mdx +1 -4
- package/docs/src/content/docs/components/account-management/regions.mdx +0 -2
- package/docs/src/content/docs/components/account-management/tagging.mdx +1 -4
- package/docs/src/content/docs/components/data-services/lake-formation.mdx +423 -0
- package/docs/src/content/docs/components/identity/iam-identity-center.mdx +148 -0
- package/docs/src/content/docs/components/networking/bastion-hosts.mdx +189 -0
- package/docs/src/content/docs/components/networking/imgs/nat_1.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/nat_2.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/vpt_1.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/vpt_2.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/vpt_3.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/vpt_4.png +0 -0
- package/docs/src/content/docs/components/networking/imgs/vpt_5.png +0 -0
- package/docs/src/content/docs/components/networking/nats.mdx +462 -0
- package/docs/src/content/docs/components/networking/vpc-peering.mdx +313 -0
- package/docs/src/content/docs/components/networking/vpcs.mdx +284 -0
- package/docs/src/content/docs/components/security/control-tower-controls.mdx +66 -0
- package/docs/src/content/docs/components/security/iam-permission-boundary.mdx +70 -0
- package/docs/src/content/docs/components/security/security-hub.mdx +123 -0
- package/docs/src/content/docs/components/security/service-deny-list.mdx +59 -0
- package/docs/src/content/docs/getting-started.mdx +2 -2
- package/docs/src/content/docs/index.mdx +2 -2
- package/docs/src/content/docs/introduction.mdx +135 -55
- package/docs/src/content/docs/reference/defaults.mdx +10 -2
- package/docs/src/content/docs/reference/extending-and-escape-hatches.mdx +50 -0
- package/docs/src/content/docs/reference/imgs/grants_diagram.png +0 -0
- package/docs/src/content/docs/reference/imgs/tag_inheritance.png +0 -0
- package/docs/src/content/docs/reference/integration/cdk-client.mdx +122 -0
- package/docs/src/content/docs/reference/integration/exported-ssm-parameters.mdx +28 -0
- package/docs/src/content/docs/reference/lake-formation-tbac-recommended-strategy.mdx +286 -0
- package/docs/src/content/docs/reference/network-address.mdx +54 -0
- package/docs/src/content/docs/{components/account-management/sop-account-setup.mdx → sop/account-setup.mdx} +2 -2
- package/docs/src/content/docs/{components/account-management/sop-add-account.mdx → sop/add-account.mdx} +3 -6
- package/docs/src/content/docs/sop/iam-identity-center-setup-external.mdx +46 -0
- package/docs/src/content/docs/sop/iam-identity-center-setup-internal.mdx +23 -0
- package/docs/src/content/docs/sop/iam-identity-center.mdx +43 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_enable_iam_identity_center.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_change.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_disable_provisioning_1.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_disable_provisioning_2.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_idp_config.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_select.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_trusted_token_1.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_external_trusted_token_2.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_internal_select_identity_source.png +0 -0
- package/docs/src/content/docs/sop/imgs/aws_sso_settings_configure.png +0 -0
- package/docs/src/content/docs/sop/imgs/select_settings.png +0 -0
- package/docs/src/content/docs/{components/account-management/sop-initial-control-tower-setup.mdx → sop/initial-control-tower-setup.mdx} +7 -7
- package/docs-old/sop/Setting Up IAM Identity Center External/README.md +1 -1
- package/docs-old/sop/Setting Up IAM Identity Center Internal/README.md +1 -1
- 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-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/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-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 +1 -1
- package/docs/public/favicon.svg +0 -1
- package/docs/src/assets/houston.webp +0 -0
- package/docs/src/content/docs/components/account-management/service-deny-list.mdx +0 -60
- package/docs/src/content/docs/components/identity/introduction.mdx +0 -4
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/account_factory_settings.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_new_account_1.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_new_account_2.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_new_account_3.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_new_account_4.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_new_account_5.png +0 -0
- /package/docs/src/content/docs/{components/account-management → sop}/imgs/aws_organisation_ids_final.png +0 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Lake Formation
|
|
3
|
+
description: Data Services - Lake Formation
|
|
4
|
+
---
|
|
5
|
+
import DualCode from '../../../../components/DualCode.astro';
|
|
6
|
+
|
|
7
|
+
[Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/what-is-lake-formation.html) (LF) is a
|
|
8
|
+
service designed to facilitate data governance, data sharing, and the management of permissions for secure data lakes.
|
|
9
|
+
|
|
10
|
+
The Data Landing Zone (DLZ) offers the option to manage Lake Formation settings, tags, tag permissions, and data
|
|
11
|
+
lake permissions. While utilizing Lake Formation within your DLZ is **optional**, it typically falls outside the
|
|
12
|
+
scope of a landing zone’s responsibilities. Instead, this is usually handled by your Data Engineering or other
|
|
13
|
+
workload teams. That said, having a centralized location for managing Lake Formation settings, tags, and permissions
|
|
14
|
+
can be beneficial, particularly in multi-account environments.
|
|
15
|
+
|
|
16
|
+
The following snippet demonstrates how to specify the `region` for the Lake Formation configuration, the `admins`
|
|
17
|
+
who are granted Lake Formation Admin permissions, the `tags` array to define tags and their corresponding permissions,
|
|
18
|
+
and the `permissions` array to set data lake permissions.
|
|
19
|
+
|
|
20
|
+
We recommend using Tag-Based Access Control (TBAC) for managing permissions within Lake Formation. By default, the
|
|
21
|
+
`hybridMode` property is set to `false`, which disables IAM permissions and relies solely on Lake Formation permissions.
|
|
22
|
+
|
|
23
|
+
<DualCode>
|
|
24
|
+
<Fragment slot="ts">
|
|
25
|
+
```ts
|
|
26
|
+
import {App} from 'aws-cdk-lib';
|
|
27
|
+
import { DataLandingZone } from 'aws-data-landing-zone';
|
|
28
|
+
|
|
29
|
+
const app = new App();
|
|
30
|
+
const dlz = new DataLandingZone(app, {
|
|
31
|
+
organization: {
|
|
32
|
+
ous: {
|
|
33
|
+
workloads: {
|
|
34
|
+
accounts: [{
|
|
35
|
+
name: 'development',
|
|
36
|
+
accountId: '111111111111',
|
|
37
|
+
lakeFormation: [{
|
|
38
|
+
region: Region.EU_WEST_1,
|
|
39
|
+
admins: ['arn:aws:iam::111111111111:role/Admin'],
|
|
40
|
+
tags: [ ... ],
|
|
41
|
+
permissions: [ ... ]
|
|
42
|
+
}]
|
|
43
|
+
},{
|
|
44
|
+
name: 'production',
|
|
45
|
+
accountId: '222222222222',
|
|
46
|
+
...
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
...
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
</Fragment>
|
|
56
|
+
<Fragment slot="python">
|
|
57
|
+
```python
|
|
58
|
+
import aws_cdk as cdk
|
|
59
|
+
import aws_data_landing_zone as dlz
|
|
60
|
+
|
|
61
|
+
app = cdk.App()
|
|
62
|
+
dlz.DataLandingZone(app,
|
|
63
|
+
organization=dlz.DLzOrganization(
|
|
64
|
+
ous=dlz.OrgOus(
|
|
65
|
+
workloads=dlz.OrgOuWorkloads(
|
|
66
|
+
accounts=[
|
|
67
|
+
dlz.DLzAccount(
|
|
68
|
+
name='development',
|
|
69
|
+
account_id='111111111111',
|
|
70
|
+
lake_formation=[dlz.DlzLakeFormationProps(
|
|
71
|
+
region=dlz.Region.EU_WEST_1,
|
|
72
|
+
admins=['arn:aws:iam::123456789012:role/Admin'],
|
|
73
|
+
tags=[ ... ],
|
|
74
|
+
permissions=[ ... ]
|
|
75
|
+
)]
|
|
76
|
+
),
|
|
77
|
+
dlz.DLzAccount(
|
|
78
|
+
name='production',
|
|
79
|
+
account_id='222222222222',
|
|
80
|
+
),
|
|
81
|
+
],
|
|
82
|
+
),
|
|
83
|
+
)
|
|
84
|
+
),
|
|
85
|
+
)
|
|
86
|
+
````
|
|
87
|
+
</Fragment>
|
|
88
|
+
</DualCode>
|
|
89
|
+
|
|
90
|
+
## LF-Tags and Permissions
|
|
91
|
+
|
|
92
|
+
The `tags` array defines the tags created in Lake Formation. Each tag consists of a key and a list of possible values.
|
|
93
|
+
|
|
94
|
+
To manage permissions on these tags, you use the `share` property, which allows you to share tags either within the account
|
|
95
|
+
or with external accounts. If you want to grant permissions on only a subset of tag values, use the `specificValues`
|
|
96
|
+
property. If this property is not provided, permissions will be granted to all values of the tag by default.
|
|
97
|
+
|
|
98
|
+
### Sharing Tags Within an Account
|
|
99
|
+
|
|
100
|
+
The `share.withinAccount` property allows you to share tags within the same account. You specify the IAM principals
|
|
101
|
+
(granted permissions on the tag) in the `principals` property. These principals can be IAM roles, IAM users, SAML users,
|
|
102
|
+
or SAML groups.
|
|
103
|
+
|
|
104
|
+
By default, the CDK role is assigned as a Lake Formation admin. Normally, Lake Formation admins cannot manage tags created
|
|
105
|
+
by other admins. To address this, we explicitly grant all admins access to the tags created by the CDK DLZ construct. This
|
|
106
|
+
is equivalent to adding every admin under the `share.withinAccount.principals` property with full access.
|
|
107
|
+
|
|
108
|
+
### Sharing Tags with External Accounts
|
|
109
|
+
|
|
110
|
+
When sharing tags with external accounts, the `share.withExternalAccount` property is used. The primary difference
|
|
111
|
+
between sharing tags internally (`withinAccount`) and externally (`withExternalAccount`) is that we restrict certain
|
|
112
|
+
actions externally. Specifically, the `TagAction.ALTER` and `TagAction.DROP` actions are not allowed for external sharing,
|
|
113
|
+
which ensures that external sharing remains read-only. This restriction prevents CloudFormation errors later in the process.
|
|
114
|
+
|
|
115
|
+
When sharing tags externally, the `principals` property can include AWS Account IDs, Organizational Unit (OU) IDs,
|
|
116
|
+
Organization IDs, or specific IAM roles. If you provide Account, OU, or Organization IDs, all Lake Formation admins
|
|
117
|
+
in the external account will receive the specified permissions. These admins can then grant permissions to other roles,
|
|
118
|
+
if applicable.
|
|
119
|
+
|
|
120
|
+
<DualCode>
|
|
121
|
+
<Fragment slot="ts">
|
|
122
|
+
```ts
|
|
123
|
+
import {App} from 'aws-cdk-lib';
|
|
124
|
+
import { DataLandingZone, TagAction } from 'aws-data-landing-zone';
|
|
125
|
+
|
|
126
|
+
const app = new App();
|
|
127
|
+
const dlz = new DataLandingZone(app, {
|
|
128
|
+
organization: {
|
|
129
|
+
ous: {
|
|
130
|
+
workloads: {
|
|
131
|
+
accounts: [{
|
|
132
|
+
name: 'development',
|
|
133
|
+
accountId: '111111111111',
|
|
134
|
+
lakeFormation: [{
|
|
135
|
+
...
|
|
136
|
+
tags: [
|
|
137
|
+
{ tagKey: 'product:ProductA', tagValues: ['true'] },
|
|
138
|
+
{
|
|
139
|
+
tagKey: 'shared',
|
|
140
|
+
tagValues: ['true', 'false'],
|
|
141
|
+
share: {
|
|
142
|
+
withinAccount: [{
|
|
143
|
+
principals: ['arn:aws:iam::111111111111:role/Team1'],
|
|
144
|
+
tagActions: [TagAction.DESCRIBE, TagAction.ASSOCIATE, TagAction.ALTER, TagAction.DROP],
|
|
145
|
+
tagActionsWithGrant: [TagAction.DESCRIBE, TagAction.ASSOCIATE, TagAction.ALTER, TagAction.DROP]
|
|
146
|
+
}],
|
|
147
|
+
withExternalAccount: [{
|
|
148
|
+
principals: ['222222222222'],
|
|
149
|
+
tagActions: [TagAction.DESCRIBE, TagAction.ASSOCIATE],
|
|
150
|
+
tagActionsWithGrant: [TagAction.DESCRIBE, TagAction.ASSOCIATE],
|
|
151
|
+
specificValues: ['true']
|
|
152
|
+
}]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
}]
|
|
157
|
+
},{
|
|
158
|
+
name: 'production',
|
|
159
|
+
accountId: '222222222222',
|
|
160
|
+
...
|
|
161
|
+
},
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
...
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
</Fragment>
|
|
170
|
+
<Fragment slot="python">
|
|
171
|
+
```python
|
|
172
|
+
import aws_cdk as cdk
|
|
173
|
+
import aws_data_landing_zone as dlz
|
|
174
|
+
|
|
175
|
+
app = cdk.App()
|
|
176
|
+
dlz.DataLandingZone(app,
|
|
177
|
+
organization=dlz.DLzOrganization(
|
|
178
|
+
ous=dlz.OrgOus(
|
|
179
|
+
workloads=dlz.OrgOuWorkloads(
|
|
180
|
+
accounts=[
|
|
181
|
+
dlz.DLzAccount(
|
|
182
|
+
name='development',
|
|
183
|
+
account_id='111111111111',
|
|
184
|
+
lake_formation=[dlz.DlzLakeFormationProps(
|
|
185
|
+
...
|
|
186
|
+
tags=[
|
|
187
|
+
{"tag_key": "product:Product1", "tag_values": ["true"]},
|
|
188
|
+
{
|
|
189
|
+
"tag_key": "shared",
|
|
190
|
+
"tag_values": ["true", "false"],
|
|
191
|
+
"share": {
|
|
192
|
+
"with_internal_account": [
|
|
193
|
+
{
|
|
194
|
+
"principals": [
|
|
195
|
+
"arn:aws:iam::111111111111:role/Team1"
|
|
196
|
+
],
|
|
197
|
+
"tag_actions": [
|
|
198
|
+
dlz.TagAction.DESCRIBE,
|
|
199
|
+
dlz.TagAction.ASSOCIATE,
|
|
200
|
+
dlz.TagAction.ALTER,
|
|
201
|
+
dlz.TagAction.DROP,
|
|
202
|
+
],
|
|
203
|
+
"tag_actions_with_grant": [
|
|
204
|
+
dlz.TagAction.DESCRIBE,
|
|
205
|
+
dlz.TagAction.ASSOCIATE,
|
|
206
|
+
dlz.TagAction.ALTER,
|
|
207
|
+
dlz.TagAction.DROP,
|
|
208
|
+
],
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"with_external_account": [
|
|
212
|
+
{
|
|
213
|
+
"principals": [
|
|
214
|
+
"222222222222"
|
|
215
|
+
],
|
|
216
|
+
"tag_actions": [
|
|
217
|
+
dlz.TagAction.DESCRIBE,
|
|
218
|
+
dlz.TagAction.ASSOCIATE,
|
|
219
|
+
],
|
|
220
|
+
"tag_actions_with_grant": [
|
|
221
|
+
dlz.TagAction.DESCRIBE,
|
|
222
|
+
dlz.TagAction.ASSOCIATE,
|
|
223
|
+
],
|
|
224
|
+
"specific_values": ["true"],
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
permissions=[ ... ]
|
|
231
|
+
)]
|
|
232
|
+
),
|
|
233
|
+
dlz.DLzAccount(
|
|
234
|
+
name='production',
|
|
235
|
+
account_id='222222222222',
|
|
236
|
+
),
|
|
237
|
+
],
|
|
238
|
+
),
|
|
239
|
+
)
|
|
240
|
+
),
|
|
241
|
+
)
|
|
242
|
+
````
|
|
243
|
+
</Fragment>
|
|
244
|
+
</DualCode>
|
|
245
|
+
|
|
246
|
+
## Data Lake Permissions
|
|
247
|
+
|
|
248
|
+
Once you have defined the LF-Tags and their corresponding permissions, the next step is to associate these LF-Tags
|
|
249
|
+
with Data Catalog resources such as Databases and Tables. While the DLZ does not handle the task of adding LF-Tags
|
|
250
|
+
to Data Catalog resources, this responsibility lies with your Data Engineering or other workload teams. It does provide
|
|
251
|
+
the option to manage "Data permissions" by granting specific permissions (such as `SELECT`) to principals (such as
|
|
252
|
+
IAM roles) on Data Catalog resources that are tagged with certain LF-Tags. We refer to these permissions as `Grants`.
|
|
253
|
+
|
|
254
|
+
The following code snippet demonstrates how to specify permissions for principals on Data Catalog resources that
|
|
255
|
+
match specific LF-Tags.
|
|
256
|
+
<DualCode>
|
|
257
|
+
<Fragment slot="ts">
|
|
258
|
+
```ts
|
|
259
|
+
import {App} from 'aws-cdk-lib';
|
|
260
|
+
import { DataLandingZone } from 'aws-data-landing-zone';
|
|
261
|
+
|
|
262
|
+
const app = new App();
|
|
263
|
+
const dlz = new DataLandingZone(app, {
|
|
264
|
+
organization: {
|
|
265
|
+
ous: {
|
|
266
|
+
workloads: {
|
|
267
|
+
accounts: [{
|
|
268
|
+
name: 'development',
|
|
269
|
+
accountId: '111111111111',
|
|
270
|
+
lakeFormation: [{
|
|
271
|
+
...
|
|
272
|
+
permissions: [
|
|
273
|
+
{
|
|
274
|
+
principals: ['222222222222'],
|
|
275
|
+
tags: [{ tagKey: 'shared', tagValues: ['true'] }],
|
|
276
|
+
databaseActions: [DatabaseAction.DESCRIBE],
|
|
277
|
+
tableActions: [TableAction.DESCRIBE, TableAction.SELECT]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
principals: [
|
|
281
|
+
'arn:aws:iam::111111111111:role/Team1',
|
|
282
|
+
'arn:aws:iam::111111111111:role/Team2'
|
|
283
|
+
],
|
|
284
|
+
tags: [{ tagKey: 'product:ProductA', tagValues: ['true'] }],
|
|
285
|
+
databaseActions: [DatabaseAction.DESCRIBE, DatabaseAction.CREATE_TABLE, DatabaseAction.ALTER, DatabaseAction.DROP],
|
|
286
|
+
tableActions: [TableAction.DESCRIBE, TableAction.SELECT, TableAction.ALTER, TableAction.DELETE, TableAction.INSERT, TableAction.DROP],
|
|
287
|
+
databaseActionsWithGrant: [DatabaseAction.DESCRIBE, DatabaseAction.CREATE_TABLE, DatabaseAction.ALTER, DatabaseAction.DROP],
|
|
288
|
+
tableActionsWithGrant: [TableAction.DESCRIBE, TableAction.SELECT, TableAction.ALTER, TableAction.DELETE, TableAction.INSERT, TableAction.DROP]
|
|
289
|
+
},
|
|
290
|
+
]
|
|
291
|
+
}]
|
|
292
|
+
},{
|
|
293
|
+
name: 'production',
|
|
294
|
+
accountId: '222222222222',
|
|
295
|
+
...
|
|
296
|
+
},
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
...
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
```
|
|
304
|
+
</Fragment>
|
|
305
|
+
<Fragment slot="python">
|
|
306
|
+
```python
|
|
307
|
+
import aws_cdk as cdk
|
|
308
|
+
import aws_data_landing_zone as dlz
|
|
309
|
+
|
|
310
|
+
app = cdk.App()
|
|
311
|
+
dlz.DataLandingZone(app,
|
|
312
|
+
organization=dlz.DLzOrganization(
|
|
313
|
+
ous=dlz.OrgOus(
|
|
314
|
+
workloads=dlz.OrgOuWorkloads(
|
|
315
|
+
accounts=[
|
|
316
|
+
dlz.DLzAccount(
|
|
317
|
+
name='development',
|
|
318
|
+
account_id='111111111111',
|
|
319
|
+
lake_formation=[dlz.DlzLakeFormationProps(
|
|
320
|
+
region=dlz.Region.EU_WEST_1,
|
|
321
|
+
admins=['arn:aws:iam::123456789012:role/Admin'],
|
|
322
|
+
tags=[ ... ],
|
|
323
|
+
permissions=[
|
|
324
|
+
{
|
|
325
|
+
"principals": ["222222222222"],
|
|
326
|
+
"tags": [
|
|
327
|
+
{
|
|
328
|
+
"tag_key": "shared",
|
|
329
|
+
"tag_values": ["true"],
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"database_actions": [DatabaseAction.DESCRIBE],
|
|
333
|
+
"table_actions": [
|
|
334
|
+
TableAction.DESCRIBE,
|
|
335
|
+
TableAction.SELECT,
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"principals": [
|
|
340
|
+
"arn:aws:iam::111111111111:role/Team1",
|
|
341
|
+
"arn:aws:iam::111111111111:role/Team2",
|
|
342
|
+
],
|
|
343
|
+
"tags": [
|
|
344
|
+
{
|
|
345
|
+
"tag_key": "product:ProductA",
|
|
346
|
+
"tag_values": ["true"],
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"database_actions": [
|
|
350
|
+
DatabaseAction.DESCRIBE,
|
|
351
|
+
DatabaseAction.CREATE_TABLE,
|
|
352
|
+
DatabaseAction.ALTER,
|
|
353
|
+
DatabaseAction.DROP,
|
|
354
|
+
],
|
|
355
|
+
"table_actions": [
|
|
356
|
+
TableAction.DESCRIBE,
|
|
357
|
+
TableAction.SELECT,
|
|
358
|
+
TableAction.ALTER,
|
|
359
|
+
TableAction.DELETE,
|
|
360
|
+
TableAction.INSERT,
|
|
361
|
+
TableAction.DROP,
|
|
362
|
+
],
|
|
363
|
+
"database_actions_with_grant": [
|
|
364
|
+
DatabaseAction.DESCRIBE,
|
|
365
|
+
DatabaseAction.CREATE_TABLE,
|
|
366
|
+
DatabaseAction.ALTER,
|
|
367
|
+
DatabaseAction.DROP,
|
|
368
|
+
],
|
|
369
|
+
"table_actions_with_grant": [
|
|
370
|
+
TableAction.DESCRIBE,
|
|
371
|
+
TableAction.SELECT,
|
|
372
|
+
TableAction.ALTER,
|
|
373
|
+
TableAction.DELETE,
|
|
374
|
+
TableAction.INSERT,
|
|
375
|
+
TableAction.DROP,
|
|
376
|
+
],
|
|
377
|
+
},
|
|
378
|
+
]
|
|
379
|
+
)]
|
|
380
|
+
),
|
|
381
|
+
dlz.DLzAccount(
|
|
382
|
+
name='production',
|
|
383
|
+
account_id='222222222222',
|
|
384
|
+
),
|
|
385
|
+
],
|
|
386
|
+
),
|
|
387
|
+
)
|
|
388
|
+
),
|
|
389
|
+
)
|
|
390
|
+
````
|
|
391
|
+
</Fragment>
|
|
392
|
+
</DualCode>
|
|
393
|
+
|
|
394
|
+
The code snippet above generates the following Grants, which are expressed as SQL statements for conceptual purposes.
|
|
395
|
+
These statements are pseudocode and are used to illustrate the permissions granted. In practice, these will be
|
|
396
|
+
translated into CloudFormation/CDK constructs.
|
|
397
|
+
|
|
398
|
+
The first permission expressed as two Grants:
|
|
399
|
+
```
|
|
400
|
+
GRANT (DESCRIBE ON DATABASES) ON TAGS (shared=True) TO '222222222222'
|
|
401
|
+
GRANT (DESCRIBE, SELECT ON TABLES) ON TAGS (shared=True) TO '222222222222'
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
The second permission expressed as four Grants:
|
|
405
|
+
```
|
|
406
|
+
GRANT (DESCRIBE, CREATE_TABLE, ALTER, DROP ON DATABASES) ON TAGS (product:ProductA=True) TO 'arn:aws:iam::111111111111:role/Team1'
|
|
407
|
+
GRANT (DESCRIBE, SELECT, ALTER, DELETE, INSERT, DROP ON TABLES) ON TAGS (product:ProductA=True) TO 'arn:aws:iam::111111111111:role/Team1'
|
|
408
|
+
|
|
409
|
+
GRANT (DESCRIBE, CREATE_TABLE, ALTER, DROP ON DATABASES) ON TAGS (product:ProductA=True) TO 'arn:aws:iam::111111111111:role/Team2'
|
|
410
|
+
GRANT (DESCRIBE, SELECT, ALTER, DELETE, INSERT, DROP ON TABLES) ON TAGS (product:ProductA=True) TO 'arn:aws:iam::111111111111:role/Team2'
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Defining permissions requires a thorough understanding of how Lake Formation's Tag-Based Access Control (TBAC)
|
|
414
|
+
functions.
|
|
415
|
+
|
|
416
|
+
For more information on Tag-Based Access Control (TBAC) permissions and our recommended strategy, please refer to the
|
|
417
|
+
[Lake Formation TBAC strategy](/reference/lake-formation-tbac-recommended-strategy).
|
|
418
|
+
|
|
419
|
+
## API References
|
|
420
|
+
|
|
421
|
+
- [DlzLakeFormationProps](/reference/api#dlzlakeformationprops)
|
|
422
|
+
- [LFTagSharable](/reference/api#lftagsharable)
|
|
423
|
+
- [LakePermission](/reference/api#lakepermission)
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: IAM Identity Center
|
|
3
|
+
description: IAM Identity Center
|
|
4
|
+
---
|
|
5
|
+
import DualCode from '../../../../components/DualCode.astro';
|
|
6
|
+
|
|
7
|
+
AWS IAM Identity Center (formerly AWS Single Sign-On) is a service that simplifies access management by enabling
|
|
8
|
+
centralized user sign-in and permissions for AWS accounts and applications. It integrates with external identity
|
|
9
|
+
providers (IdPs) or the internal Identity Center directory to manage users and authentication. This provides a unified
|
|
10
|
+
way to assign and enforce access permissions.
|
|
11
|
+
|
|
12
|
+
The Data Landing Zone does not create an IAM Identity Center instance but integrates with an existing one. Once the
|
|
13
|
+
required IDs are provided to the DLZ construct, it manages users, permissions, and thier account assignment
|
|
14
|
+
within the IAM Identity Center.
|
|
15
|
+
|
|
16
|
+
Refer to the [SOP - IAM Identity Center Setup](/sop/iam-identity-center) for detailed instructions on setting up IAM
|
|
17
|
+
Identity Center and providing the necessary IDs to the DLZ configuration.
|
|
18
|
+
|
|
19
|
+
:::note
|
|
20
|
+
The email address must be used as the username. If an external IdP is used, the email address must match the one in the IdP.
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
Users can be added to access groups, which are assigned permission sets. Permission sets can be created from managed
|
|
24
|
+
policies or inline policies. Access groups support wildcards for account names, making it easy to assign permissions
|
|
25
|
+
across multiple accounts.
|
|
26
|
+
|
|
27
|
+
The example below assigns the `AdministratorAccess` permission set (created by
|
|
28
|
+
`...Defaults.iamIdentityCenterPermissionSets()`) to the user `you@org.com` in all accounts, as specified by the wildcard
|
|
29
|
+
`*`.
|
|
30
|
+
|
|
31
|
+
<DualCode>
|
|
32
|
+
<Fragment slot="ts">
|
|
33
|
+
```ts
|
|
34
|
+
import {App} from 'aws-cdk-lib';
|
|
35
|
+
import { DataLandingZone } from 'aws-data-landing-zone';
|
|
36
|
+
|
|
37
|
+
const app = new App();
|
|
38
|
+
const dlz = new DataLandingZone(app, {
|
|
39
|
+
iamIdentityCenter: {
|
|
40
|
+
arn: 'IdentityCenterARN',
|
|
41
|
+
id: 'IdentityCenterID',
|
|
42
|
+
storeId: 'StoreID',
|
|
43
|
+
users: [
|
|
44
|
+
{
|
|
45
|
+
userName: 'you@org.com',
|
|
46
|
+
name: 'Name',
|
|
47
|
+
surname: 'LastName',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
permissionSets: [
|
|
51
|
+
// Provides the AWS managed policy `AdministratorAccess` and `ReadOnlyAccess` as permission sets
|
|
52
|
+
...Defaults.iamIdentityCenterPermissionSets(),
|
|
53
|
+
// Create custom permission sets from managed policies
|
|
54
|
+
{
|
|
55
|
+
name: 'power-user-permission-set',
|
|
56
|
+
managedPolicyArns: ['arn:aws:iam::aws:policy/PowerUserAccess']
|
|
57
|
+
},
|
|
58
|
+
// Create a custom permission sets from inline policies
|
|
59
|
+
{
|
|
60
|
+
name: 's3-only-access',
|
|
61
|
+
inlinePolicyStatement: new iam.PolicyStatement({
|
|
62
|
+
actions: ['s3:*'],
|
|
63
|
+
resources: ['*'],
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
accessGroups: [
|
|
68
|
+
{
|
|
69
|
+
name: 'admin-access-group',
|
|
70
|
+
accountNames: ['*'], // All accounts
|
|
71
|
+
// accountNames: ['project-1-*'], // All accounts starting with `project-1-`
|
|
72
|
+
// accountNames: ['root', 'development', 'production'], // Specific accounts
|
|
73
|
+
userNames: [
|
|
74
|
+
'you@org.com',
|
|
75
|
+
],
|
|
76
|
+
permissionSetName: 'AdministratorAccess',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
````
|
|
82
|
+
|
|
83
|
+
</Fragment>
|
|
84
|
+
<Fragment slot="python">
|
|
85
|
+
```python
|
|
86
|
+
import aws_cdk as cdk
|
|
87
|
+
import aws_data_landing_zone as dlz
|
|
88
|
+
|
|
89
|
+
app = cdk.App()
|
|
90
|
+
dlz.DataLandingZone(app,
|
|
91
|
+
...
|
|
92
|
+
organization=dlz.DLzOrganization(
|
|
93
|
+
iam_identity_center={
|
|
94
|
+
"arn": "IdentityCenterARN",
|
|
95
|
+
"id": "IdentityCenterID",
|
|
96
|
+
"store_id": "StoreID",
|
|
97
|
+
"users": [
|
|
98
|
+
{
|
|
99
|
+
"user_name": "you@org.com",
|
|
100
|
+
"name": "Name",
|
|
101
|
+
"surname": "LastName",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
"permission_sets": [
|
|
105
|
+
# Provides the AWS managed policy `AdministratorAccess` and `ReadOnlyAccess` as permission sets
|
|
106
|
+
*Defaults.iam_identity_center_permission_sets(),
|
|
107
|
+
# Create custom permission sets from managed policies
|
|
108
|
+
{
|
|
109
|
+
name: 'power-user-permission-set',
|
|
110
|
+
managed_policy_arns: ['arn:aws:iam::aws:policy/PowerUserAccess']
|
|
111
|
+
},
|
|
112
|
+
# Create a custom permission sets from inline policies
|
|
113
|
+
{
|
|
114
|
+
name: 's3-only-access',
|
|
115
|
+
inline_policy_statement: {
|
|
116
|
+
actions: ['s3:*'],
|
|
117
|
+
resources: ['*'],
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"access_groups": [
|
|
122
|
+
{
|
|
123
|
+
"name": "admin-access-group",
|
|
124
|
+
"account_names": ["*"], # All accounts
|
|
125
|
+
# accountNames: ['project-1-*'], # All accounts starting with `project-1-`
|
|
126
|
+
# accountNames: ['root', 'development', 'production'], # Specific accounts
|
|
127
|
+
"user_names": ["you@org.com"],
|
|
128
|
+
"permission_set_name": "AdministratorAccess",
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
),
|
|
133
|
+
)
|
|
134
|
+
````
|
|
135
|
+
</Fragment>
|
|
136
|
+
</DualCode>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## Defaults
|
|
142
|
+
|
|
143
|
+
The `Defaults.iamIdentityCenterPermissionSets` function creates two permission sets:
|
|
144
|
+
- `AdministratorAccess`: Using the AWS managed policy `AdministratorAccess`
|
|
145
|
+
- `ReadOnlyAccess`: Using the AWS managed policy `ReadOnlyAccess`
|
|
146
|
+
|
|
147
|
+
## API References
|
|
148
|
+
- [IamIdentityCenterProps](/reference/api/#aws-data-landing-zone.IamIdentityCenterProps)
|