Architektúra AWS namodelovaná v UML
Bežný AWS diagram je stena ikoniek služieb, ktorá hovorí, ktoré produkty ste si kúpili. Toto je ten druhý druh: dva diagramy, ktoré povedia, čo smie kam siahnuť, cez ktorý port a ktoré časti sú vaše na výmenu.
8 min čítaniaUML 2.5.123 z 23
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.
- 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.
- 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.
- The artifact sits inside the node that runs it.
api.jarinside 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
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
- 01Icon diagrams name products; deployment diagrams name paths, protocols and ports.
- 02Draw the region as a containing node - nesting is the boundary, no arrow needed.
- 03Label every communication path with its protocol and port, or it has not been checked.
- 04Put artifacts inside the node that executes them.
- 05Leave IAM, logging and secrets off: they are configuration, not participants.
- 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.
04Časté otázky
Má byť diagram architektúry AWS v UML alebo v ikonách AWS?
Oboje, pre iných čitateľov. Diagram s ikonami je lepší na predaj a zaškolenie, lebo produkty pozná každý; UML diagram nasadenia je lepší pracovný dokument, pretože pomenúva protokoly, porty a smery - a práve na to sa pýta bezpečnostná revízia aj incident o tretej ráno.
Ako na UML diagrame zobraziť VPC alebo región?
Ako uzol, ktorý ostatné obsahuje, nakreslený tak, že sú v ňom vnorené. Vzťahom je samotné obsiahnutie, takže netreba šípku, a otázka hranice - čo je v regióne a čo mimo neho - je vidieť na obrázku namiesto v legende.
Musím nakresliť každú službu AWS, ktorú používame?
Nie a práve kreslenie všetkých robí tieto diagramy nepoužiteľnými. Službu zahrňte, ak cez ňu vedie cesta požiadavky alebo ak drží stav, ktorý by ste museli migrovať; vynechajte všetko, čo je skôr konfigurácia než účastník, teda IAM, CloudWatch či Secrets Manager.
Ako zabrániť tomu, aby cloudový diagram po migrácii zostarol?
Rozdeľte ho na dva. Pohľad na komponenty pomenúva zmluvy, od ktorých závisí váš kód, a prechod na inú platformu prežije nedotknutý; meniť sa musí len pohľad na nasadenie, čím sa z prekreslenia všetkého stane úprava jediného diagramu.
Súvisiace články