Deployment diagrams: cloud provider icons

Deployment diagrams: cloud provider icons

puml.online

简介 / Introduction

When you draw an architecture diagram, a plain box labelled “server” rarely tells the reader which cloud it belongs to. PlantUML ships official symbol libraries (stdlib) for AWS, Azure and Kubernetes, so a node can carry a vendor-specific stereotype; Mermaid has no icon library, but the same semantics can be expressed with subgraphs, node shapes and colour classes. This post builds the same three-cloud topology in both engines and compares the trade-offs.

PlantUML 版

PlantUML’s approach is to include the vendor icon libraries and then tag nodes with their stereotypes:

  • !include <awslib/AWSCommon> + !include <awslib/AWSSimplified> — AWS icons and colours;
  • !include <azure/AzureCommon> — Azure icons and colours;
  • !include <k8s/common> — Kubernetes icons and colours.

With the libraries loaded, node "EC2" as ec2 <<AWS-EC2>> renders a node with AWS semantics. Group the nodes into AWS Cloud / Azure / Kubernetes boundaries with package, then add the cross-cloud calls.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@startuml
!include <awslib/AWSCommon>
!include <awslib/AWSSimplified>
!include <azure/AzureCommon>
!include <k8s/common>

package "AWS Cloud" as aws {
node "EC2" as ec2 <<AWS-EC2>>
node "S3" as s3 <<AWS-SimpleStorageService>>
}
package "Azure" as az {
node "VM" as vm <<Azure-VM>>
node "Blob" as blob <<Azure-BlobStorage>>
}
package "Kubernetes" as k8s {
node "Pod" as pod <<KubernetesPod>>
}
ec2 -up-> s3 : HTTPS
vm -up-> blob : HTTPS
pod -up-> ec2 : API
@enduml

A few practical notes:

  • The icon libraries are backend resources. api.puml.online already serves awslib, azure and k8s; for a self-hosted PlantUML you must place the corresponding .puml files on the include path, otherwise the server answers cannot include <awslib/AWSCommon>.
  • Don’t mix two libraries with the same name (awslib and awslib14 conflict) — pick one and stick to it.
  • Keep the alias separate from the display label (as ec2); aliases make cross-cloud edges much easier to read.

Mermaid 版

Mermaid has no vendor icon library. The equivalent is subgraph for cloud boundaries, node shapes for service types, and classDef for colour:

  • subgraph aws["AWS Cloud"] — cloud vendor / cluster boundary;
  • ["Text"] rectangle, [("Text")] cylinder — compute versus storage;
  • -->|label| — an edge with a label.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
flowchart TB
subgraph aws["AWS Cloud"]
ec2["EC2 Instance"]
s3[("S3 Bucket")]
ec2 --> s3
end
subgraph azure["Azure"]
vm["Virtual Machine"]
blob[("Blob Storage")]
vm --> blob
end
subgraph k8s["Kubernetes"]
pod["Pod"]
end
pod -->|API| ec2

If you really want icons there are two options: add emoji to the label (["🟧 EC2"]), which works in most Markdown renderers but depends heavily on the available fonts; or use Mermaid v11.4.1’s architecture-beta diagram type, which supports cloud-icon groups such as group aws(cloud)[AWS Cloud] (the Mermaid build shipped with this site includes that diagram type).

对比 / Side-by-side

Aspect PlantUML Mermaid
Where the vendor identity comes from Official stdlib libraries (awslib / azure / k8s) attached through <<stereotype>> No icon library — use subgraph names, node shapes, emoji, or architecture-beta‘s (cloud) groups
Cloud boundary package "AWS Cloud" { ... } subgraph aws["AWS Cloud"]
Distinguishing service types Vendor stereotype names (<<AWS-EC2>>, <<Azure-VM>>) Node shapes: ["Text"] for compute, [("Text")] for storage
Colours Shipped with the libraries, no style code needed You write classDef / style yourself
Dependencies The rendering backend must have the stdlib files installed Pure front-end, no external dependency

小结 / Wrap-up

When you need a polished vendor look and control the rendering backend, PlantUML’s stdlib is the more direct route — at the price of having the icon files installed server-side. When you need zero dependencies and a diagram that renders anywhere, Mermaid’s subgraphs and node shapes already carry the “who runs where” layer of meaning. The two are not mutually exclusive: keep a PlantUML version for the formal architecture document and a Mermaid version for READMEs and wikis.

  • Title: Deployment diagrams: cloud provider icons
  • Author: puml.online
  • Created at : 2026-11-24 09:00:00
  • Updated at : 2026-11-26 01:07:01
  • Link: https://puml.online/blog/deployment-diagram-cloud-providers-en/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Deployment diagrams: cloud provider icons