コード例 #1
0
    def __init__(self, scope: core.Construct, **kwargs) -> None:
        self.deploy_env = active_environment
        super().__init__(scope,
                         id=f"{self.deploy_env.value}-data-lake-stack",
                         **kwargs)

        self.data_lake_raw_bucket = BaseDataLakeBucket(self,
                                                       layer=DataLakeLayer.RAW)

        self.data_lake_raw_bucket.add_lifecycle_rule(
            transitions=[
                s3.Transition(
                    storage_class=s3.StorageClass.INTELLIGENT_TIERING,
                    transition_after=core.Duration.days(90),
                ),
                s3.Transition(
                    storage_class=s3.StorageClass.GLACIER,
                    transition_after=core.Duration.days(360),
                ),
            ],
            enabled=True,
        )

        self.data_lake_raw_staged = BaseDataLakeBucket(
            self, layer=DataLakeLayer.STAGED)

        self.data_lake_raw_curated = BaseDataLakeBucket(
            self, layer=DataLakeLayer.CURATED)
コード例 #2
0
class DataLakeStack(core.Stack):
    def __init__(self, scope: core.Construct, **kwargs) -> None:
        self.deploy_env = active_environment
        super().__init__(scope,
                         id=f'{self.deploy_env.value}-data-lake-stack',
                         **kwargs)

        self.data_lake_raw_bucket = BaseDataLakeBucket(
            self, deploy_env=self.deploy_env, layer=DataLakeLayer.RAW)

        self.data_lake_raw_bucket.add_lifecycle_rule(transitions=[
            s3.Transition(storage_class=s3.StorageClass.INTELLIGENT_TIERING,
                          transition_after=core.Duration.days(90)),
            s3.Transition(storage_class=s3.StorageClass.GLACIER,
                          transition_after=core.Duration.days(360))
        ],
                                                     enabled=True)

        # Data Lake Processed
        self.data_lake_processed_bucket = BaseDataLakeBucket(
            self, deploy_env=self.deploy_env, layer=DataLakeLayer.PROCESSED)

        # Data Lake Aggregated
        self.data_lake_aggregated_bucket = BaseDataLakeBucket(
            self, deploy_env=self.deploy_env, layer=DataLakeLayer.AGGREGATED)
コード例 #3
0
    def __init__(self, scope: core.Construct, **kwargs):
        self.deploy_env = active_environment
        super().__init__(scope, id=f"{self.deploy_env.value}-data-lake-stack", **kwargs)

        self.data_lake_bronze_bucket = BaseDataLakeBucket(
            self, layer=DataLakeLayer.BRONZE
        )
        self.data_lake_silver_bucket = BaseDataLakeBucket(
            self, layer=DataLakeLayer.SILVER
        )
        self.data_lake_gold_bucket = BaseDataLakeBucket(self, layer=DataLakeLayer.GOLD)