-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathaws_s3_config_notify_lambda_dynamodb.d2
More file actions
executable file
·120 lines (114 loc) · 3.84 KB
/
aws_s3_config_notify_lambda_dynamodb.d2
File metadata and controls
executable file
·120 lines (114 loc) · 3.84 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env d2
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# Author: Hari Sekhon
# Date: 2025-02-20 20:39:54 +0700 (Thu, 20 Feb 2025)
#
# https///github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# A W S S 3 C o n f i g N o t i f y L a m b d a D y n a m o D B
# ============================================================================ #
direction: down
title: {
label: AWS S3 Config Upload Notify Lambda DynamoDB
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
classes: {
users: {
label: Users
# icon: https://icons.terrastruct.com/essentials%2F359-users.svg
icon: https://diagrams.mingrammer.com/img/resources/onprem/client/users.png
shape: image
}
apps: {
label: Apps
icon: https://icons.terrastruct.com/azure%2FIntune%20Service%20Color%2FClient%20Apps.svg
shape: image
}
aws: {
label: ""
# the icon itself says Amazon Web Services, this is redundant labelling
# icon: https://icons.terrastruct.com/aws%2F_Group%20Icons%2FAWS-Cloud-alt_light-bg.svg
icon: https://icons.terrastruct.com/dev%2Famazonwebservices.svg
shape: image
}
dynamodb: {
label: DynamoDB
# icon: https://icons.terrastruct.com/aws%2FDatabase%2FAmazon-DynamoDB.svg
icon: https://diagrams.mingrammer.com/img/resources/aws/database/dynamodb.png
shape: image
}
lambda: {
label: Lambda
# icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg
icon: https://diagrams.mingrammer.com/img/resources/aws/compute/lambda.png
shape: image
}
s3: {
label: S3
# icon: https://icons.terrastruct.com/aws%2FStorage%2FAmazon-Simple-Storage-Service-S3_Bucket-with-Objects_light-bg.svg
icon: https://diagrams.mingrammer.com/img/resources/aws/storage/simple-storage-service-s3.png
shape: image
}
iam: {
label: IAM
# icon: https://icons.terrastruct.com/aws%2FSecurity%2C%20Identity%2C%20&%20Compliance%2FAWS-Identify-and-Access-Management_IAM.svg
icon: https://diagrams.mingrammer.com/img/resources/aws/security/identity-and-access-management-iam.png
shape: image
}
}
aws: AWS {
vendor_aws: Vendor AWS Account {
aws.class: aws
vendor.class: users
vendor.label: Vendor
}
customer_aws: Customer AWS Account {
aws.class: aws
s3.class: s3
s3.label: S3\nconfig bucket
lambda.class: lambda
dynamodb.class: dynamodb
apps.class: apps
s3 -> lambda: S3 Notification\nTrigger {style.animated: true}
lambda -> dynamodb: Python Code\nUpdates Config Tables {style.animated: true}
lambda -> s3: Python Code\nReads & Parses Config Files {style.animated: true}
dynamodb -> apps: Config Tables\nRead by Apps {style.stroke-dash: 5}
}
# vendor_aws.vendor -> customer_aws.s3: Config Files Upload\n(JSON / YAML) {style.animated: true}
vendor_aws.vendor -> configs: {style.animated: true}
configs -> customer_aws.s3: Upload {style.animated: true}
configs: Configs {
style.multiple: true
json_config: |json
{
"json_config":
...
}
| {
shape: code
style.multiple: true # doesn't work on code shape and other shapes look ugly for this - applied to Configs container instead
}
yaml_config: |yaml
---
yaml_config:
...
|
}
customer_aws.s3 -> iam: IAM S3 Bucket Permissions\ngranted cross-account\nto vendor user or role {style.stroke-dash: 5}
iam -> vendor_aws.vendor: IAM S3 Bucket Permissions\ngranted cross-account\nto vendor user or role {style.stroke-dash: 5}
iam.class: iam
iam.class: iam
aws.class: aws
}