Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!

If you haven’t used the Amazon Q Developer CLI Agent, this is your sign to get started!

Installation Steps

Install is very quick and easy, though the steps vary depending on your operating system, so you’ll need to follow the required steps…


This content originally appeared on DEV Community and was authored by Faye Ellis

If you haven't used the Amazon Q Developer CLI Agent, this is your sign to get started!

Installation Steps

Install is very quick and easy, though the steps vary depending on your operating system, so you'll need to follow the required steps for your particular OS.

I use a Mac, so my steps were really straightforward, if you are also using a Mac, here's what you do to install the Q Developer Agent CLI. In a terminal, simply type:

brew install amazon-q
You can verify the install using:

q --version
If it doesn’t show the version the first time, then just restart your shell or terminal and try again.

exec $SHELL
q --version

Next login to the Q Developer CLI, you'll get the choice of logging in using your AWS Builder ID which is the free-tier option, or if you are subscribed to pro-tier log in using your IAM Identity Center credentials:

q login
Then, to start a session with the Q Developer CLI, its:
q chat

Creating Architecture Diagrams from an IaC Template

I wanted to use Q to help me quickly create an architecture diagram based on the contents of my CloudFormation template that I was using to create a basic VPC. As my template is saved in GitHub, I provided a link to the raw file in my prompt and Q was able to find it, however you can of course get Q to read the files on your local machine, inside the directory you're working in.

The Prompt

First I tried creating a Mermaid diagram. If you haven't used Mermaid before, it's a JavaScript based tool used for rendering diagrams from markdown text.
Here's the prompt I used:

Create a mermaid diagram that represents the contents
of the CloudFormation template named cf-template.yaml.
Here is a link to the template:
https://raw.githubusercontent.com/fayekins/amazon-q-dev/refs/heads/main/cf-template.yaml 
The diagram should include all the AWS resources that
are described in the template, and use the following 
best practices: 
consistent spacing between elements, 
align elements properly, 
use clear labels for all components, 
include CIDR blocks for all networking components,
make sure text is a readable size.

The resulting diagram that Amazon Q Developer created can be viewed by pasting the resulting code into the Mermaid Live Editor.

Here's the result, not too bad!

Q generated a simple diagram based on my CloudFormation template

Refining the Diagram

Ultimately, I wanted to get Q to create diagrams that I could actually use. For that I really need the official AWS icons. So I asked Q to create a draw.io diagram instead, using the official icons. Here's my next prompt:

Can you create the same diagram again but this time
create a draw.io diagram using the correct AWS icons
for the AWS resources.

Here's the response from Q, explaining the steps taken and instructions for viewing the diagram.
The response from Q, explaining the steps taken and instructions for viewing the diagram

And here is the result, a pretty decent diagram!

An updated version of my diagram, in draw.io format and using AWS icons

I'm really happy with the result, and will definitely be able to use this capability going forward! Amazon Q Developer is certainly improving fast and I'm looking forward to seeing what else it can do to save me time day-to-day.

Would you use AI to create your architecture diagrams?


This content originally appeared on DEV Community and was authored by Faye Ellis


Print Share Comment Cite Upload Translate Updates
APA

Faye Ellis | Sciencx (2025-05-23T17:17:04+00:00) Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!. Retrieved from https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/

MLA
" » Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!." Faye Ellis | Sciencx - Friday May 23, 2025, https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/
HARVARD
Faye Ellis | Sciencx Friday May 23, 2025 » Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!., viewed ,<https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/>
VANCOUVER
Faye Ellis | Sciencx - » Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/
CHICAGO
" » Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!." Faye Ellis | Sciencx - Accessed . https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/
IEEE
" » Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent!." Faye Ellis | Sciencx [Online]. Available: https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/. [Accessed: ]
rf:citation
» Create Architecture Diagrams in Seconds with the Amazon Q Developer CLI Agent! | Faye Ellis | Sciencx | https://www.scien.cx/2025/05/23/create-architecture-diagrams-in-seconds-with-the-amazon-q-developer-cli-agent/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.