forked from brightsparc/amazon-sagemaker-drift-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
37 lines (28 loc) · 1.05 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
import logging
from aws_cdk import core
from infra.pipeline_stack import PipelineStack
from infra.service_catalog_stack import ServiceCatalogStack
# Configure the logger
logger = logging.getLogger(__name__)
logging.basicConfig(level="INFO")
# Create App and stacks
app = core.App()
# Attempts to retrive custom bucket name and object key prefix for deployable assets.
artifact_bucket = app.node.try_get_context("drift:ArtifactBucket")
artifact_bucket_prefix = app.node.try_get_context("drift:ArtifactBucketPrefix")
# Create the pipeline stack
synth = core.DefaultStackSynthesizer(
file_assets_bucket_name=artifact_bucket,
generate_bootstrap_version_rule=False,
bucket_prefix=artifact_bucket_prefix,
)
PipelineStack(app, "drift-pipeline", synthesizer=synth)
# Create the SC stack
synth = core.DefaultStackSynthesizer(
file_assets_bucket_name=artifact_bucket,
generate_bootstrap_version_rule=False,
bucket_prefix=artifact_bucket_prefix,
)
ServiceCatalogStack(app, "drift-service-catalog", synthesizer=synth)
app.synth()