forked from leandrodamascena/aws-detect-a-cat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagram.py
40 lines (30 loc) · 1.38 KB
/
diagram.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
39
40
from diagrams import Cluster, Diagram
from diagrams.aws.iot import InternetOfThings, IotCore, IotEvents
from diagrams.aws.management import Cloudwatch
from diagrams.aws.compute import Lambda
from diagrams.aws.storage import S3
from diagrams.aws.database import Dynamodb
from diagrams.aws.integration import SQS, SNS
from diagrams.aws.ml import Rekognition
with Diagram("IOT Diagram", show=True, direction="TB"):
_iotoutside = InternetOfThings("ESP-32 Board")
with Cluster("AWS Serverless IOT"):
_iotcore = IotCore("ESP-32 Iot Core")
_iotevent = IotEvents("Event trigger SQS")
_sqsesp32 = SQS("SQS Queue ESP32")
_logsesp32 = Cloudwatch("Log Operations")
_eventtriggeresp32 = Cloudwatch("Event Trigger to LAMBDA")
_lambdaprocessimages = Lambda("Lambda process images")
_imgrekog = Rekognition("Rekognition process")
_tabledynamo = Dynamodb("Table history")
_s3bucket = S3("S3 bucket images converted")
_snstopico = SNS("Alert cat found")
_iotoutside >> _iotcore >> _iotevent >> _sqsesp32
_iotcore >> _logsesp32
_eventtriggeresp32 >> _lambdaprocessimages >> _sqsesp32
_lambdaprocessimages >> _imgrekog
_imgrekog >> _lambdaprocessimages
_lambdaprocessimages >> _tabledynamo
_lambdaprocessimages >> _s3bucket
_lambdaprocessimages >> _snstopico
_lambdaprocessimages >> _logsesp32