forked from cdk-patterns/serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
26 lines (21 loc) · 1.13 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
#!/usr/bin/env python3
import subprocess
from aws_cdk import core
from the_xray_tracer.the_xray_tracer_stack import TheXrayTracerStack
from the_xray_tracer.the_http_flow_stack import TheHttpFlowStack
from the_xray_tracer.the_dynamo_flow_stack import TheDynamoFlowStack
from the_xray_tracer.the_sns_flow_stack import TheSnsFlowStack
from the_xray_tracer.the_sqs_flow_stack import TheSqsFlowStack
# install node dependencies for lambdas
subprocess.check_call("npm i".split(), cwd="lambda_fns", stdout=subprocess.DEVNULL)
app = core.App()
xray_tracer = TheXrayTracerStack(app, "the-xray-tracer")
http_flow = TheHttpFlowStack(app, 'the-http-flow-stack', sns_topic_arn=xray_tracer.sns_topic_arn)
dynamo_flow = TheDynamoFlowStack(app, 'the-dynamo-flow-stack', sns_topic_arn=xray_tracer.sns_topic_arn)
sns_flow = TheSnsFlowStack(app, 'the-sns-flow-stack', sns_topic_arn=xray_tracer.sns_topic_arn)
sqs_flow = TheSqsFlowStack(app, 'the-sqs-flow-stack', sns_topic_arn=xray_tracer.sns_topic_arn)
http_flow.add_dependency(xray_tracer)
dynamo_flow.add_dependency(xray_tracer)
sns_flow.add_dependency(xray_tracer)
sqs_flow.add_dependency(xray_tracer)
app.synth()