Created: 2023-08-11 | Updated: 2024-09-21

DynamoDB

New (v0.2.0)

Table of contents

  1. Node Type: dynamo
  2. Rendering:
  3. Code Snippet:
  4. drawio dynamo vertex:
  5. Advanced for Geeks:
    1. Style:
    2. Vertex size:
    3. Full XML dump:
    4. drawio file:

Node Type: dynamo

Rendering:

lambda

Code Snippet:

# given
mcd = MultiCloudDiagrams()

# when
table_arn = 'arn:aws:dynamodb:eu-west-1:123456789012:table/prod-dynamo-table'
table_name = 'prod-dynamo-table'
metadata = {
    'DeletionProtectionEnabled': True,
    'ItemCount': 900,
    'TableSizeBytes': 123,
    'Replicas': 0,
    'RCU': 1,
    'WCU': 1
}
mcd.add_vertex(node_id=table_arn, node_name=table_name, node_type='dynamo', metadata=metadata)

drawio dynamo vertex:

<mxCell id="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/prod-dynamo-table" parent="1" vertex="1">
    <mxGeometry width="72" height="81" as="geometry"/>
</mxCell>

Advanced for Geeks:

Style:

style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.dynamo_db;fillColor=#2E73B8;gradientColor=none;"
attributevalue
alignleft
dashed0
fillColor#2E73B8
gradientColornone
html1
outlineConnect0
shapemxgraph.aws3.dynamo_db
verticalAligntop
verticalLabelPositionbottom

Vertex size:

attributevalue
width72
height81

Full XML dump:

<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud">
    <diagram id="diagram_1" name="AWS components">
        <mxGraphModel dx="1015" dy="661" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1">
            <root>
                <mxCell id="0"/>
                <mxCell id="1" parent="0"/>
                <mxCell id="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/prod-dynamo-table" value="&lt;b&gt;Name&lt;/b&gt;: prod-dynamo-table&lt;BR&gt;&lt;b&gt;ARN&lt;/b&gt;: arn:aws:dynamodb:eu-west-1:123456789012:table/prod-dynamo-table&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;DeletionProtectionEnabled&lt;/b&gt;: True&lt;BR&gt;&lt;b&gt;ItemCount&lt;/b&gt;: 900&lt;BR&gt;&lt;b&gt;TableSizeBytes&lt;/b&gt;: 123&lt;BR&gt;&lt;b&gt;Replicas&lt;/b&gt;: 0&lt;BR&gt;&lt;b&gt;RCU&lt;/b&gt;: 1&lt;BR&gt;&lt;b&gt;WCU&lt;/b&gt;: 1" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.dynamo_db;fillColor=#2E73B8;gradientColor=none;" parent="1" vertex="1">
                    <mxGeometry width="72" height="81" as="geometry"/>
                </mxCell>
            </root>
        </mxGraphModel>
    </diagram>
</mxfile>

drawio file:

Download generated dynamo.drawio:

Download