Archyno
UMLPratique de la modélisation

Architecture AWS, modélisée en UML

Le diagramme AWS habituel est un mur d'icônes de services qui dit quels produits vous avez achetés. Voici l'autre sorte : deux diagrammes qui disent ce qui peut atteindre quoi, sur quel port, et quelles parties vous appartiennent et sont remplaçables.

8 min de lectureUML 2.5.123 sur 23

AWS eu-central-1HTTPSHTTPSHTTP :8080TCP 5432«device»Browser«executionEnvironment»CloudFront + S3«device»Application Load Balancer«executionEnvironment»ECS Fargate service«device»RDS PostgreSQL«artifact»api.jar
One AWS workload as a deployment diagram. The box around four of the five nodes is the region; the labels on the paths are the protocol and port, which is the information an icon diagram leaves out.

01Two kinds of AWS diagram

The familiar one is a canvas of service icons with lines between them. It is genuinely good at one job - showing which products are in play to somebody who already knows what those products do - and it is why every AWS deck contains one.

What it does not carry is direction, protocol, port, or whether a line means "calls over the network" or "is configured by". Those four are the entire content of a security review, and they are what somebody staring at an alert at 3am is trying to reconstruct. A deployment diagram carries them, at the cost of looking less like a brochure.

02Reading the topology

Three things on the hero figure are worth copying into your own, and none of them is about AWS.

  1. The region is a box, not a label. Nesting is the containment relationship, so the boundary question - what is inside eu-central-1 and what is not - is answered by geometry rather than by a legend. The browser being outside it is the most important fact on the diagram.
  2. Every path carries a protocol and a port."HTTPS", "TCP 5432". An unlabelled line between a load balancer and a service is a line that has never been checked against a security group.
  3. The artifact sits inside the node that runs it. api.jar inside the Fargate service, rather than beside it with an arrow. What is deployed where is the question this diagram kind exists for.

What is deliberately absent: IAM, CloudWatch, Secrets Manager, the NAT gateway. Every one is real and none of them is a participant in a request path - they are configuration, and putting them on the diagram doubles its size while answering no question anybody asked.

03The same system without the vendors

«use»«use»Order API«interface»IOrderStoreRDS adapter«interface»IFileStoreS3 adapter
The component view. Nothing here is called RDS or S3 except the two adapters, so the question "what would leaving AWS cost?" has an answer you can point at.

This is the diagram that makes cloud architecture reviewable rather than merely documented. The Order API depends on IOrderStore and IFileStore; the adapters name the products. Everything above the adapters is portable by construction, and everything that is not portable is in two boxes you can count.

It is also the half that does not change when the infrastructure does. Move from ECS to EKS, or from eu-central-1 to two regions, and the hero figure is redrawn while this one is untouched - which is the practical reason to keep them apart rather than merging them into one impressive picture.

In one line each

  1. 01Icon diagrams name products; deployment diagrams name paths, protocols and ports.
  2. 02Draw the region as a containing node - nesting is the boundary, no arrow needed.
  3. 03Label every communication path with its protocol and port, or it has not been checked.
  4. 04Put artifacts inside the node that executes them.
  5. 05Leave IAM, logging and secrets off: they are configuration, not participants.
  6. 06Keep the component view separate - it survives the re-platforming that invalidates the topology.

The same treatment applied to a shop is in e-commerce architecture, modelled, and the service-boundary question is taken further in the microservices example.

04Questions fréquentes

Faut-il faire un diagramme AWS en UML ou avec les icônes AWS ?

Les deux, pour des lecteurs différents. Le diagramme d'icônes est meilleur pour vendre et pour accueillir un arrivant, car chacun reconnaît les produits ; un diagramme de déploiement UML est un meilleur document de travail, car il nomme protocoles, ports et directions - ce que demandent une revue de sécurité et un incident à trois heures du matin.

Comment représenter un VPC ou une région en UML ?

Comme un nœud qui contient les autres, dessiné par imbrication. La relation est le contenant lui-même, donc aucune flèche n'est nécessaire, et la question de la frontière - ce qui est dans la région et ce qui n'y est pas - apparaît sur l'image plutôt que dans une légende.

Faut-il dessiner tous les services AWS utilisés ?

Non, et c'est précisément ce qui rend ces diagrammes inutilisables. Incluez un service si un chemin de requête le traverse ou s'il détient un état qu'il faudrait migrer ; laissez de côté ce qui relève de la configuration plutôt que d'un participant, comme IAM, CloudWatch ou Secrets Manager.

Comment éviter qu'un diagramme cloud vieillisse après une migration ?

Coupez-le en deux. La vue composants nomme les contrats dont dépend le code et traverse un changement de plateforme sans bouger ; seule la vue de déploiement doit changer, ce qui transforme un redessin complet en la modification d'un seul diagramme.

Tous les articles