Common Recipes
Short, copy-paste answers for what people do most: no access, Terraform, several regions, staying up to date, slides and pull requests.
Each section is one question with the commands that answer it. Replace the example values (the region, the project, the file names) with yours. New to this? Do the quickstart first.
The most common one. Read the account, open the diagram, send a link or a picture. The quickstart walks through it.
viewert graph map aws --region us-east-1 --open
# then: click the lock to share a link, or Export → PNGYou do not need any. Ask someone who has access to run one command and send you the file. It reads (and lists) your resources, never any data or secrets. You then draw it on your own computer, with the network off if you like.
# 1. WHAT TO SEND YOUR TEAMMATE (they run this where they are signed in to AWS):
viewert graph snapshot aws --region us-east-1 -o aws-snapshot.json
# (no Viewert tool? they can export an AWS Config snapshot instead: aws configservice deliver-config-snapshot)
# 2. WHAT YOU RUN with the file they send back:
viewert graph map aws --from-snapshot aws-snapshot.json --openWhoever has AWS access can use AWS's own export (AWS Config). Send them the line below, ask for the file back, and draw it as above. A Config export holds fewer connections than a live read (no load balancer targets, for example) and the Graph's description says what is missing.
# they run:
aws configservice select-resource-config --expression "SELECT resourceId, resourceType, resourceName, arn, awsRegion, accountId, tags, configuration, relationships" > config.json
# you run:
viewert graph map aws --from-snapshot config.json --openNo cloud access needed: nothing is run and nothing is contacted. Export the state as JSON from the folder where you run Terraform, then draw it. This works with a remote state too, because Terraform fetches it for you.
cd my-terraform-folder
terraform show -json > state.json
viewert graph map terraform state.json --openDraw the plan. What it will create is green, what it will change is amber, and what it will destroy is red, with a Changes only view. Attach the exported picture to the pull request so reviewers see the effect at a glance.
terraform plan -out tfplan
terraform show -json tfplan > plan.json
viewert graph map terraform plan.json --open
# or just a list in the terminal:
viewert graph diff state.json plan.jsonDraw less when the account is big or you care about one area. --region can repeat, --all-regions covers every region, and --only or --skip choose services.
viewert graph map aws --region us-east-1 --region eu-west-1
viewert graph map aws --all-regions
viewert graph map aws --region us-east-1 --only ec2,rds,elbv2
viewert graph map aws --region us-east-1 --skip lambdaUse the same profile name you pass to the AWS CLI. One run covers one account; to map several, run it once per account and keep them as separate Graphs.
viewert graph map aws --profile prod --region us-east-1 --open
viewert graph map aws --profile staging --region us-east-1 --openThe same idea, with each cloud's own login. Azure needs a one-time extension.
# Azure (every subscription you can see; add --subscription ID to pick one)
az login
az extension add --name resource-graph
viewert graph map azure --open
# Google Cloud
gcloud auth login
viewert graph map gcp --project my-project-id --open
# Kubernetes (whatever kubectl points at; add --namespace to narrow it)
viewert graph map k8s --openRender the chart to YAML and draw the file. Nothing is deployed and no cluster is needed.
helm template ./my-chart > rendered.yaml
viewert graph map k8s --from-snapshot rendered.yaml --openRun the same command again with --replace and the Graph's id (it is in the Graph's address: viewert.com/graph/ID). It asks before overwriting, because hand edits in that Graph are replaced.
viewert graph map aws --region us-east-1 --replace 01J8Z… --yesKeep a dated snapshot (a plain file with names and ids, no secrets, safe to commit to git), then compare any two. It lists what was added, removed and changed.
viewert graph snapshot aws --region us-east-1 -o aws-2026-10.json
# ...a month later:
viewert graph snapshot aws --region us-east-1 -o aws-2026-11.json
viewert graph diff aws-2026-10.json aws-2026-11.json
# draw the differences (green new, amber changed, red gone) and save them
viewert graph diff aws-2026-10.json aws-2026-11.json --saveMake a scheduled job fail when the cloud no longer matches a saved baseline.
viewert graph snapshot aws --region us-east-1 -o today.json
viewert graph diff baseline.json today.json --fail-on-changeExport a picture. In the editor: Export → PNG (sharp at up to 2×) or SVG (scales to any size). Tick Title to name it and Legend to explain the lines. Docs and slide tools accept both.
# or from the terminal, no browser:
viewert graph map aws --region us-east-1 --no-upload --out architecture.vgf
# then open architecture.vgf in the editor (Import) and ExportA drawing is a starting point you are free to change. In the editor you can drag boxes, rename them, delete the ones you do not want to show, add a box (the Components menu has every AWS, Google Cloud and Azure service with its icon), and draw a line between two boxes to add a connection Viewert could not know about, such as which app uses which database.
Use the views at the top (Request path, Data stores, Messaging, Internet exposure), switch layers off, or draw less with --only and --region. Dotted network lines are on their own layer, off by default.
Add --out and --no-upload. The Graph is written to the file (VGF, Viewert's open format) and nothing is saved to your account. Import it later from the editor's Import button.
viewert graph map aws --region us-east-1 --no-upload --out my-account.vgf