aws-data-landing-zone 0.0.41 → 0.0.42
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 +16 -14
- package/docs/src/content/docs/components/account-management/accounts.mdx +0 -3
- 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/service-deny-list.mdx +0 -2
- package/docs/src/content/docs/components/account-management/sop-add-account.mdx +0 -3
- package/docs/src/content/docs/components/account-management/sop-initial-control-tower-setup.mdx +0 -3
- 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/introduction.mdx +1 -6
- package/docs/src/content/docs/reference/defaults.mdx +1 -2
- 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/lake-formation-tbac-recommended-strategy.mdx +286 -0
- 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
|
@@ -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)
|
|
@@ -130,7 +130,6 @@ approvals in production environments.
|
|
|
130
130
|
</Fragment>
|
|
131
131
|
<Fragment slot="python">
|
|
132
132
|
```python
|
|
133
|
-
#!/usr/bin/env python3
|
|
134
133
|
import aws_cdk as cdk
|
|
135
134
|
import aws_data_landing_zone as dlz
|
|
136
135
|
|
|
@@ -167,8 +166,6 @@ approvals in production environments.
|
|
|
167
166
|
)
|
|
168
167
|
),
|
|
169
168
|
)
|
|
170
|
-
|
|
171
|
-
app.synth()
|
|
172
169
|
````
|
|
173
170
|
|
|
174
171
|
</Fragment>
|
|
@@ -299,8 +296,7 @@ all subnets, to the private subnets in the `production` account's VPC in the `eu
|
|
|
299
296
|
|
|
300
297
|
</Fragment>
|
|
301
298
|
<Fragment slot="python">
|
|
302
|
-
```python {
|
|
303
|
-
#!/usr/bin/env python3
|
|
299
|
+
```python {79-84}
|
|
304
300
|
import aws_cdk as cdk
|
|
305
301
|
import aws_data_landing_zone as dlz
|
|
306
302
|
|
|
@@ -388,7 +384,6 @@ all subnets, to the private subnets in the `production` account's VPC in the `eu
|
|
|
388
384
|
)
|
|
389
385
|
)
|
|
390
386
|
)
|
|
391
|
-
app.synth()
|
|
392
387
|
```
|
|
393
388
|
|
|
394
389
|
</Fragment>
|
|
@@ -34,7 +34,6 @@ resources created by the DLZ:
|
|
|
34
34
|
</Fragment>
|
|
35
35
|
<Fragment slot="python">
|
|
36
36
|
```python
|
|
37
|
-
#!/usr/bin/env python3
|
|
38
37
|
import aws_cdk as cdk
|
|
39
38
|
import aws_data_landing_zone as dlz
|
|
40
39
|
|
|
@@ -49,7 +48,7 @@ resources created by the DLZ:
|
|
|
49
48
|
],
|
|
50
49
|
...
|
|
51
50
|
)
|
|
52
|
-
|
|
51
|
+
|
|
53
52
|
```
|
|
54
53
|
</Fragment>
|
|
55
54
|
</DualCode>
|
|
Binary file
|
|
Binary file
|