cdk-datalake-constructs
Very experimental until version 1.0. This is my attempt at simplifying deploying various datalake strategies in AWS with the CDK.
Table of Contents
Features
- Easy to Start - Create a Datalake in a few lines.
- Easy to Expand - Expand into multiple accounts and into a data mesh.
- Easy to Admin - Initial governance created on deploy.
Installation
TypeScript/JavaScript
$ npm install @randyridgley/cdk-datalake-constructs
Python
$ pip install cdk-datalake-constructs
.Net
$ nuget install CDK.Datalake.Constructs
# See more: https://www.nuget.org/packages/CDK.Datalake.Constructs/
Usage
Basic
import { DataLake } from '@randyridgley/cdk-datalake-constructs';
const taxiPipes: Array<dl.Pipeline> = [
pipelines.YellowPipeline(),
pipelines.GreenPipeline(),
]
const dataProducts: Array<dl.DataProduct> = [{
pipelines: taxiPipes,
accountId: lakeAccountId,
dataCatalogAccountId: '123456789012',
databaseName: 'taxi-product'
}]
// deploy to local account
new dl.DataLake(this, 'LocalDataLake', {
name: 'data-lake',
accountId: centralAccountId,
region: 'us-east-1',
policyTags: {
"classification": "public,confidential,highlyconfidential,restricted,critical",
"owner": "product,central,consumer"
},
stageName: Stage.PROD,
dataProducts: dataProducts,
createDefaultDatabase: false
});
Data Mesh
You can setup cross account access and pre-created policy tags for TBAC access in Lake Formation
const lakeAccountId = app.node.tryGetContext('lakeAccountId')
const centralAccountId = app.node.tryGetContext('centralAccountId')
const consumerAccountId = app.node.tryGetContext('consumerAccountId')
const taxiPipes: Array<dl.Pipeline> = [
pipelines.YellowPipeline(),
pipelines.GreenPipeline(),
]
const dataProducts: Array<dl.DataProduct> = [{
pipelines: taxiPipes,
accountId: lakeAccountId,
dataCatalogAccountId: centralAccountId,
databaseName: 'taxi-product'
}]
// deploy to the central account
new dl.DataLake(this, 'CentralDataLake', {
name: 'central-lake',
accountId: centralAccountId,
region: 'us-east-1',
policyTags: {
"classification": "public,confidential,highlyconfidential,restricted,critical",
"owner": "product,central,consumer"
},
stageName: Stage.PROD,
crossAccount: {
consumerAccountIds: [consumerAccountId, lakeAccountId],
dataCatalogOwnerAccountId: centralAccountId,
region: 'us-east-1', // this is still only single region today
},
dataProducts: dataProducts,
createDefaultDatabase: true
});
// deploy to the data product account
const datalake = new dl.DataLake(this, 'LocalDataLake', {
name: 'local-lake',
accountId: lakeAccountId,
region: 'us-east-1',
stageName: Stage.PROD,
dataProducts: dataProducts,
createDefaultDatabase: true
});
// Optionally add custom resource to download public data set products
datalake.createDownloaderCustomResource(accountId, region, props.stageName)
// deploy to consumer account
const datalake = new dl.DataLake(this, 'ConsumerDataLake', {
name: 'consumer-lake',
accountId: consumerAccountId,
region: 'us-east-1',
stageName: Stage.PROD,
policyTags: {
"access": "analyst,engineer,marketing"
},
createDefaultDatabase: true
});
Documentation
Construct API Reference
See API.md.
Supporting this project
I'm working on this project in my free time, if you like my project, or found it helpful and would like to support me any contributions are much appreciated! ❤️
License
This project is distributed under the MIT.
Metadata
Release files for cdk-datalake-constructs 0.0.64
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdk-datalake-constructs-0.0.64.tar.gz | 653.0 kB | Without provenance | Details for cdk-datalake-constructs-0.0.64.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdk_datalake_constructs-0.0.64-py3-none-any.whl | Python 3 | none | any | Details for cdk_datalake_constructs-0.0.64-py3-none-any.whl |
Total release size: 1.3 MB
Release files / cdk-datalake-constructs-0.0.64.tar.gz
| Download URL | cdk-datalake-constructs-0.0.64.tar.gz |
|---|---|
| Size | 653.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de15f14c43c4b645394df0851e4b78cba7d67e0089126128286f94698ed9c1b1
|
|
BLAKE2b-256 checksum How to use checksums |
9a2c47cebb3a33bd4f4f337863212a43ad03b15931aab67f388a2b908a258b68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Release files / cdk_datalake_constructs-0.0.64-py3-none-any.whl
| Download URL | cdk_datalake_constructs-0.0.64-py3-none-any.whl |
|---|---|
| Size | 652.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f024f8a612210f150916ab777915786cef2dd740460df4486e27297882228c6
|
|
BLAKE2b-256 checksum How to use checksums |
88c4f6557ba448e1184aed422e7d9e996975553d34af2196f625444d4aa55b31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Security for cdk-datalake-constructs 0.0.64
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.