This command line interface (CLI) tool enables drawing infrastructure diagrams for Amazon Web Services through YAML code. It facilitates diagram-as-code without relying on image libraries.
The CLI tool promotes code reuse, testing, integration, and automating the diagramming process. It allows managing diagrams with Git by writing human-readable YAML.
Example templates are here. Check out the Introduction Guide as well for additional information.


$ go install github.com/awslabs/diagram-as-code/cmd/awsdac@latest
$ brew install awsdac
Usage:
awsdac <input filename> [flags]
Flags:
-c, --cfn-template [beta] Create diagram from CloudFormation template
-d, --dac-file [beta] Generate YAML file in dac (diagram-as-code) format from CloudFormation template
-h, --help help for awsdac
-o, --output string Output file name (default "output.png")
--override-def-file string For testing purpose, override DefinitionFiles to another url/local file
-t, --template Processes the input file as a template according to text/template.
-v, --verbose Enable verbose logging
--version version for awsdac
$ awsdac examples/alb-ec2.yaml
$ awsdac privatelink.yaml -o custom-output.png
For contributing guidelines, please see CONTRIBUTING.md.
cmd/ - CLI tools (awsdac, awsdac-mcp-server)internal/ - Core implementationcache/ - Caching logicctl/ - Core control logicdefinition/ - Definition file handlingfont/ - Font managementtypes/ - Core types and structuresvector/ - Vector operationstest/ - Integration teststools/ - Development toolsexamples/ - Example YAML filesdoc/ - DocumentationSee CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.
$ claude mcp add diagram-as-code \
-- python -m otcore.mcp_server <graph>