AWS CDK Constructs that can be used to create datalakes/meshes and more
Project description
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
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from randyridgley.cdk_datalake_constructs import DataLake
taxi_pipes = [
pipelines.YellowPipeline(),
pipelines.GreenPipeline()
]
data_products = [{
"pipelines": taxi_pipes,
"account_id": lake_account_id,
"data_catalog_account_id": "123456789012",
"database_name": "taxi-product"
}]
# deploy to local account
dl.DataLake(self, "LocalDataLake",
name="data-lake,",
account_id=central_account_id,
region="us-east-1",
policy_tags={
"classification": "public,confidential,highlyconfidential,restricted,critical",
"owner": "product,central,consumer"
},
stage_name=Stage.PROD,
data_products=data_products,
create_default_database=False
)
Data Mesh
You can setup cross account access and pre-created policy tags for TBAC access in Lake Formation
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
lake_account_id = app.node.try_get_context("lakeAccountId")
central_account_id = app.node.try_get_context("centralAccountId")
consumer_account_id = app.node.try_get_context("consumerAccountId")
taxi_pipes = [
pipelines.YellowPipeline(),
pipelines.GreenPipeline()
]
data_products = [{
"pipelines": taxi_pipes,
"account_id": lake_account_id,
"data_catalog_account_id": central_account_id,
"database_name": "taxi-product"
}]
# deploy to the central account
dl.DataLake(self, "CentralDataLake",
name="central-lake,",
account_id=central_account_id,
region="us-east-1",
policy_tags={
"classification": "public,confidential,highlyconfidential,restricted,critical",
"owner": "product,central,consumer"
},
stage_name=Stage.PROD,
cross_account={
"consumer_account_ids": [consumer_account_id, lake_account_id],
"data_catalog_owner_account_id": central_account_id,
"region": "us-east-1"
},
data_products=data_products,
create_default_database=True
)
# deploy to the data product account
datalake = dl.DataLake(self, "LocalDataLake",
name="local-lake",
account_id=lake_account_id,
region="us-east-1",
stage_name=Stage.PROD,
data_products=data_products,
create_default_database=True
)
# Optionally add custom resource to download public data set products
datalake.create_downloader_custom_resource(account_id, region, props.stage_name)
# deploy to consumer account
datalake = dl.DataLake(self, "ConsumerDataLake",
name="consumer-lake",
account_id=consumer_account_id,
region="us-east-1",
stage_name=Stage.PROD,
policy_tags={
"access": "analyst,engineer,marketing"
},
create_default_database=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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk-datalake-constructs-0.0.27.tar.gz
(643.9 kB
view hashes)
Built Distribution
Close
Hashes for cdk-datalake-constructs-0.0.27.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51734c912bd5fdb164eabc03dc1d10b79bfdf169ebcadfd5d6e31996b8b6483a |
|
MD5 | 1ba7180d9aa8420eae2ed0d00f9e9fd2 |
|
BLAKE2b-256 | 2833ee3e000893ae33fad65814384010b8c37ad061fbd4d5b3436a077ebfc55b |
Close
Hashes for cdk_datalake_constructs-0.0.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f10e9ad19e3d78026455e30f0ec895bee093d75aa2209204bef62ba5ae173617 |
|
MD5 | bb2ef54ace53dce63d5c20f1ba804740 |
|
BLAKE2b-256 | ded3d4a70938a3d87f1f4f38647d02aebdb29881ab85da034492466ba8432f49 |