-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapp.py
32 lines (23 loc) · 906 Bytes
/
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
import os
import aws_cdk as cdk
import yaml
from cdk_stacks.cdk_semantic_search_pipeline_stack import CdkSemanticSearchPipelineStack
from cdk_stacks.cdk_semantic_search_frontend_stack import CdkSemanticSearchFrontEndStack
with open("config.yaml") as file:
config = yaml.load(file, Loader=yaml.SafeLoader)
stack_name = config["stack_name"]
env = cdk.Environment(
account=os.environ["CDK_DEFAULT_ACCOUNT"],
region=os.environ["CDK_DEFAULT_REGION"]
)
app = cdk.App()
pipeline = CdkSemanticSearchPipelineStack(app, f"{stack_name}-Pipeline", env=env)
frontend = CdkSemanticSearchFrontEndStack(app, f"{stack_name}-FrontEnd",
pipeline.lambda_query_opensearch,
pipeline.opensearch_domain,
env=env
)
for stack in [pipeline, frontend]:
cdk.Tags.of(stack).add("Creator", "CDK")
cdk.Tags.of(stack).add("Description", "Column semantic search pipeline")
app.synth()