-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
38 lines (28 loc) · 1.15 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
38
#!/usr/bin/env python3
from stacks.back_end.serverless_sqs_producer_stack.serverless_sqs_producer_stack import ServerlessSqsProducerStack
from stacks.back_end.serverless_sqs_consumer_stack.serverless_sqs_consumer_stack import ServerlessSqsConsumerStack
from aws_cdk import core
app = core.App()
# Produce message events and ingest into SQS queue
sqs_message_producer_stack = ServerlessSqsProducerStack(
app,
f"sqs-message-producer-ingestor-stack",
stack_log_level="INFO",
description="Miztiik Automation: Produce message events and ingest into SQS queue"
)
# Consume messages from SQS
reliable_message_queue_stack = ServerlessSqsConsumerStack(
app,
f"{app.node.try_get_context('project')}-stack",
stack_log_level="INFO",
reliable_queue=sqs_message_producer_stack.get_queue,
max_msg_receive_cnt=sqs_message_producer_stack.max_msg_receive_cnt,
description="Miztiik Automation: Consume messages from SQS"
)
# Stack Level Tagging
_tags_lst = app.node.try_get_context("tags")
if _tags_lst:
for _t in _tags_lst:
for k, v in _t.items():
core.Tags.of(app).add(k, v, apply_to_launched_instances=True)
app.synth()