README
¶
Dormeto CLI
Estimate what Dormeto would save on your AWS accounts, from your laptop, before anything is installed.
Website · Get started · Product · Security · Manager · Router
dormeto is the Dormeto command line. dormeto aws estimate reads an AWS account or a whole organization with read-only
access and estimates what Dormeto would save on the web workloads behind your Application Load Balancers (EC2, Auto
Scaling, ECS, EKS, and the RDS databases that nap with them): the workloads that could nap, how long each would sleep and
wake, and the monthly saving net of Dormeto's own cost. It gives a summary in the terminal and a Markdown and a JSON
report. It installs nothing in your accounts and sends nothing anywhere but to AWS.
dormeto aws install then installs the Dormeto manager in your AWS account with CodeBuild, after its checks and your
confirmation of the plan (see Install the manager). It is the only command that changes your
accounts itself.
Once the manager runs, every operation of its dashboard is a command too, with the same AWS profile: routers, workloads, discovery, operations, users, the audit, the manager's update (see Routers and workloads and the sections after it). These ask the manager, which acts as it does for the dashboard.
Every command above, with all of its subcommands and options, is under dormeto aws, as the Google Cloud ones are under
dormeto gcp (dormeto --help lists aws, gcp and version). Before the CLI that has aws, they were top-level
(dormeto install, dormeto routers list); those names still work, hidden from the help and from the completion, with
the same output and exit code, and each prints one line on stderr saying the new name: dormeto: "dormeto install" is now "dormeto aws install"; the old name goes in a later release. The old names go in a later release.
Install
Pick one channel. They all install the same binary, dormeto, with no runtime to install.
Homebrew (macOS, Linux)
brew install dormeto/tap/dormeto
The script (macOS, Linux)
curl -fsSL https://dormeto.com/install.sh | sh
It downloads the archive for your system, checks it against the release's checksums and installs dormeto. Two
variables change it: DORMETO_VERSION (a version, without the v, to install instead of the latest) and DORMETO_INSTALL_DIR (where to
install dormeto; $HOME/.local/bin by default). It needs no sudo and changes nothing else.
curl -fsSL https://dormeto.com/install.sh | DORMETO_VERSION=0.1.0 DORMETO_INSTALL_DIR="$HOME/.local/bin" sh
Go
go install github.com/Dormeto/cli/cmd/dormeto@latest
Windows, and the release archives
Each release has an archive per system (macOS, Linux and Windows, on Intel/AMD and ARM) and a checksums.txt on the
releases page. On Windows, download dormeto_<version>_windows_amd64.zip
(_arm64 on an ARM PC), unzip it and put dormeto.exe in a folder of your PATH. Elsewhere, unpack the archive and put
dormeto in your PATH.
An archive downloaded with a browser is blocked by the system the first time:
- macOS: remove the quarantine mark,
xattr -d com.apple.quarantine ./dormeto. - Windows: in SmartScreen's warning, choose "More info" and then "Run anyway".
(curl, Homebrew and go install do not need this.)
Check the install with dormeto version.
First run
Log in with a profile that can read the accounts (see Permissions), then estimate:
aws sso login --profile <profile>
dormeto aws estimate --profile <profile> --uptime
--uptime also measures when each EC2 instance, ECS service and database actually ran, so the estimate does not count
the hours a schedule already stops them. The first run reads every account and region: minutes to an hour for a large
organization. A second run reads the cache. dormeto aws estimate --help prints the options.
Options
Usage: dormeto aws estimate --profile <profile>[,<profile>...] [--accounts 111111111111,222222222222]
[--regions eu-west-1,eu-west-3] [--exclude-tags 'env=dev|test,team=web' ...] [--uptime | --ec2-uptime | --ecs-uptime | --rds-uptime] [--role <name>]
[--baseline always|business-hours] [--timezone Europe/Paris] [--discount-compute 0-90] [--discount-databases 0-90]
[--refresh discovery|metrics] [--days 14] [--window <minutes>] [--max-wakes 3|none]
[--min-saving 1|none] [--max-wakes-rds 2|none] [--parallel 5] [--out <dir>]
An option bad or missing prints its message and the usage, and exits with code 2. Credentials that do not work exit
with code 1 and AWS's message; an SSO session expired, invalid or never logged in adds the command that renews it,
aws sso login --profile <profile>, for the profile that failed.
--profile <profile>[,<profile>...]: the AWS profile (required). The organization's active accounts when the profile may list them (the management account or a delegated administrator), else its own account only, and the report says why. Member accounts are reached through--role; the profile's own account uses its own credentials. Several profiles, comma-separated (for example one SSO profile per account when none may list the organization): each reaches its accounts, merged into one estimate; an account a profile logs in to directly is read with it, never through another's role.--accounts <id>[,<id>...]: restrict the estimate to some of the organization's accounts (with several profiles, to the merged accounts). An id the organization does not have is listed apart; if none of them is found, the command exits with code 2.--regions <region>[,<region>...]: the regions to scan, instead of every enabled region.--exclude-tags <criterion>(repeatable): leave out the workloads with these tags on their load balancer, target group or listener rule. In one criterion, every comma-separated key must match (and), each with one of its|-separated values (or); a key alone matches any value. Repeated, any criterion excludes (or). For example--exclude-tags 'env=dev|test,team=web' --exclude-tags dormeto:ignore. They are left out before their requests are read and listed apart in the report, with the criterion that matched.--uptime: sets--ec2-uptime,--ecs-uptimeand--rds-uptime.--ec2-uptime: measures when each EC2 instance without an Auto Scaling group ran over the days read (itsCPUUtilization, which EC2 publishes every 5 minutes while an instance runs): its actual cost counts the hours it ran, its savings only the hours Dormeto would nap it while it ran (an instance stopped at night by a schedule saves less). An instance found stopped is estimated from the hours it ran (without the option, it is left out). Instances Dormeto already manages and Auto Scaling groups are not measured.--ecs-uptime: measures when each ECS service had a task over the days read (itsCPUUtilization, which ECS publishes every minute while the service has a task), and how many tasks it had (itsLiveTaskCount, the most in each 5 minutes): its actual cost and its savings count only those hours, at its average number of tasks then, whatever its count when discovered (a service found at 0 at night, or autoscaled). The report's Uptime column gives both, such as "36%, 2.4 tasks". A service withoutLiveTaskCountis priced at its desired count when discovered, one task when found at 0. Without the option, a service found at 0 tasks is left out. Services Dormeto already manages are not measured.--rds-uptime: measures when each companion database was available (itsCPUUtilization): its saving and cost count only those hours. A database stopped when discovered (a schedule may start it) is estimated from them, else left out.--role <name>: the role assumed in each member account (OrganizationAccountAccessRoleby default: accounts created by AWS Organizations have it, invited ones do not). An account whose role cannot be assumed is listed with AWS's reason and how to include it.--baseline always|business-hours: what the workloads cost without Dormeto, for the saving: running all the time (always, the default), or only during business hours, 8:00 to 20:00 each day (business-hours, for workloads you already stop at night).--timezone <zone>: the time zone ofbusiness-hours(an IANA name such asEurope/Paris;UTCby default).--discount-compute <0-90>: your discount on compute (EC2, ECS, EKS) in percent, such as a Savings Plan's, applied to the prices.--discount-databases <0-90>: your discount on databases (RDS) in percent, such as a reserved instance's.--refresh discovery|metrics: read again what the cache holds.discoveryreads discovery and the requests again,metricsthe requests only.--days <n>: the days of requests read before the run (14 by default, 1 to 15: CloudWatch keeps the requests by the minute for 15 days). The terminal and the report give the period read, with its dates.--window <minutes>: one idle window, 5 to 1440, for every workload's figures (a what-if); the report then also gives the savings at each workload's recommended window. Without it, every figure (the savings, the cost with Dormeto, by account and region) is at each workload's recommended window, the one a customer would set.--max-wakes <n>|none: leave out a workload that would wake more thanntimes a day (3 by default; its visitors would wait more than it saves). It is listed apart in the report with its window, wakes a day and the saving left out.nonekeeps them all.--min-saving <dollars>|none: leave out a workload that would save less than that a month (1 by default; not worth installing Dormeto for). Listed apart, as--max-wakes' are.nonekeeps them all.--max-wakes-rds <n>|none: leave out the companion database of a workload that would wake more thanntimes a day (2 by default: a database takes minutes to start).nonekeeps them. A companion database is an RDS instance or an Aurora provisioned cluster (not Aurora Serverless) whose security group lets in a workload's: it naps with it, and its saving is added to the workload's (before--min-saving) and listed apart. Left out, with why: excluded by its own tags, reached by another workload of the region, a read replica or one with replicas, or its workload waking too often.--parallel <n>: how many accounts (discovery) or regions (requests and uptime) are read at a time (5 by default, 1 to 50). A region's workloads are described eight at a time.--out <dir>: where the reports are written (the current directory by default).
The estimate is conservative: every request counts as activity and as a wake (there is no waker yet to set scanners
apart), a wake lasts 60 seconds, there is no visitor's wait, and databases not attached to a load balancer are not
counted. It runs in three phases: discovery (what each eligible workload's backend would stop, as the router
describes it), requests (each workload's RequestCount per minute over the days read, --days, five metrics per
GetMetricData call), and the estimate (Dormeto's replay priced with the product's price book, at each workload's
recommended window, or at --window, net of Dormeto's cost). Before them, it says what it reads to reach the accounts:
the profile's account and organization, then the organization's accounts, listed one organizational unit at a time (a
large organization takes a while). In a terminal, each phase shows one progress line; piped or redirected, it prints a
line per account and region.
Where Dormeto is already installed, the estimate finds the workloads it manages (marked "managed by Dormeto"), asleep
ones included. Dormeto's cost then starts from the installation as it is now (the manager, a router per account and
region with onboarded workloads, each onboarded workload) and adds a signed "New recommendation" line: the workloads to
onboard, less the onboarded ones that --exclude-tags, --max-wakes or --min-saving leave, with the routers added
or removed. The total is what Dormeto costs once the recommendation is applied. An onboarded workload asleep when
discovered stays in that cost, but its saving is not counted (nothing is running to measure).
Permissions
These are the estimate's (the install's are in Permissions to install). Read-only: the estimate calls Describe*, List* and Get* operations, plus sts:AssumeRole to reach member
accounts, and Kubernetes GETs. It changes nothing.
sts:GetCallerIdentity,AssumeRoleorganizations:DescribeOrganization,ListRoots,ListOrganizationalUnitsForParent,ListAccountsForParent,ListTagsForResourceec2:DescribeRegions,DescribeInstances,DescribeSpotPriceHistory,DescribeSecurityGroupselasticloadbalancing:Describe*autoscaling:DescribeAutoScalingGroupsecs:ListClusters,ListServices,DescribeServices,DescribeTaskDefinitioneks:ListClusters,DescribeClusterrds:DescribeDBInstances,DescribeDBClusterscloudwatch:GetMetricData(about $0.01 per 1,000 workloads)pricing:GetProducts
The ReadOnlyAccess AWS managed policy covers them all: attach it to the profile's role, and to the role of each
member account.
An EKS cluster's workloads are read through its Kubernetes API, which needs the profile's own EKS access entry on the
cluster (the AmazonEKSViewPolicy access policy is enough). A cluster it cannot read is listed with the reason. A
cluster whose endpoint is private (private access on, public endpoint closed or limited to some addresses) is read by
the router through a proxy function in its VPC, so the estimate, which runs before any install, lists it with the reason
to install the router of its account and region; one with private access off and a limited public endpoint says to turn
private access on.
Report
The terminal gets a summary: the savings, the table by account and the workloads with the most to save. Two files are
written in --out, named after the date of the run: estimate-<date>.md, the full report, and estimate-<date>.json,
the same figures for a program (its tool says dormeto and the version that wrote it). The table by account counts
each account's excluded workloads, whatever the reason (tags, left out, too many wakes, too small a saving); the
workloads table gives each one's uptime (measured, else 100% assumed), its recommended window, saving and wakes a day.
Cache
~/.cache/dormeto/estimate/<organization or account>/, under $XDG_CACHE_HOME when it is set. It holds discovery and
each account's regions for a day, the requests while their days (--days) end on the same UTC day, and the prices. An
interrupted run resumes where it stopped; a cache file that cannot be read is read again, never an error.
--refresh discovery reads discovery and the requests again, --refresh metrics the requests only. To start over,
delete the directory.
Privacy
dormeto sends nothing but its calls to AWS and to your EKS clusters' APIs, with your credentials, from your machine.
There is no telemetry and no update check. What it reads stays in the cache and the reports you choose to share.
That is the estimate's promise, and it holds. dormeto aws install also downloads from releases.dormeto.com
(latest.json, then the release's SHA256SUMS and the release, checked against it). Its builds, in your account,
download Terraform from releases.hashicorp.com and the providers through the Terraform registry, with Terraform's
checkpoint (its version check) off. The CLI and the builds use only your credentials and your account; still no
telemetry.
Install the manager
dormeto aws install installs the Dormeto manager in an AWS account, with CodeBuild: Terraform runs in your account, not
on your machine. It asks what it needs, checks what can fail before anything is created, shows the plan, applies it once
you confirm, and follows the build. It needs a manager release 0.11.0 or later (an account outside any organization
needs 0.11.0). In order:
- Where it runs. It reads the profile's account and its organization, and suggests the mode:
organization(the manager reads every account of the organization) in an organization with all features, elseaccount(the manager reads its own account only, with why). A manager in the organization's management account is allowed after a warning. - The questions. The release (the latest by default), the region (the profile's, else
eu-west-1is suggested), the environment (prod), the administrators' emails, the mode, the management account's profile, a custom domain and SES. Each has a flag; a question already answered by a flag or a previous run is not asked. - The checks, read-only (
dormeto aws install checkruns them alone): credentials, administrator rights (simulated), the region and CodeBuild, the organization, an existing install of the same environment or another manager's resources and Dormeto roles, the release, the administrators' addresses, the domain's certificate and zone, the SES identity, and organization access. A failure stops the install before anything is created; a warning is shown and asked about once. - What it creates in your account, by API calls, tagged
project=dormetoandmanaged-by=dormeto-cli: the bucketdmt-install-<account>-<region>(the answers, the generated Terraform configuration, the state and the plans), the role and the CodeBuild projectdmt-<env>-install, and the log group/aws/codebuild/dmt-<env>-install(90 days). - The plan. A first build runs
terraform plan -outand keeps the saved plan. The CLI shows what it creates, changes and destroys (a destroy in an install or an upgrade first, as a warning), and asks. After your confirmation, a second build applies exactly that saved plan, never-auto-approve. An install is two builds, about 15 minutes. - The tracking. In a terminal, one status line (the phase, the resources done out of the plan's total, the one in
progress, the elapsed time); without one, or with
--verbose, Terraform's lines. Ctrl-C detaches: the build goes on, anddormeto aws install statusfollows it again. A failure prints the last lines of the log and where to read the rest. - The result. The dashboard's URL must answer over HTTPS (a new distribution can take some minutes), and each administrator's invitation is checked.
The generated Terraform configuration is written again at every run: edit nothing in it by hand. An input of the manager
module without a flag is set with --var name=<JSON value> (--var 'alert_emails=["ops@example.com"]'), kept for the
next runs.
First run
Log in with a profile that has administrator rights in the account to install in (see Permissions to install), then:
aws sso login --profile <profile>
dormeto aws install --profile <profile>
Without a terminal (a script, a pipeline), every answer comes from a flag. Answers that have a default take it: the
latest release, the suggested mode, no domain and no SES, the environment prod; only the administrators' emails are
required. The run stops after the plan, prints what it would do and the command that applies it:
dormeto aws install --profile <profile> --admin-emails you@example.com
dormeto aws install apply --profile <profile>
dormeto aws install apply is the confirmation when you run it yourself: it shows the last saved plan, applies it and
follows the build. It refuses a plan made for an uninstall. --yes takes the suggested answers; it never confirms a plan.
Flags
dormeto aws install check, apply and status take the same flags, except --adopt-state and --adopt-module.
dormeto aws install --help prints them.
--profile <profile>: the AWS profile (the SDK's default, such asAWS_PROFILE, when absent).--region <region>: the manager's region (the profile's, else asked, witheu-west-1suggested).--env <name>: the environment, 1 to 10 lowercase letters, digits or inner hyphens (prodby default). One environment per account.--version <version>: the manager release to install (the latest by default, fromreleases.dormeto.com).--release <dir>: a local release directory, uploaded to the install's bucket instead of downloaded: an unreleased manager.--admin-emails <email>[,<email>...]: the administrators, at least one; each gets an invitation.--mode organization|account: where the manager discovers workloads (suggested from the account's organization).--domain <host>: the dashboard's custom domain (acloudfront.nethost by default), with--certificate-arnand--zone-id.--certificate-arn <arn>: the domain's ACM certificate, inus-east-1, issued and covering the dashboard's host andauth.<host>.--zone-id <id>: the domain's Route 53 hosted zone.--ses-identity <identity>: the SES identity that sends the invitations (Cognito sends them by default, about 50 a day), with--email-from. An identity not verified is a failure; an SES account still in its sandbox, a warning.--email-from <address>: the invitations' sender, with--ses-identity.--var name=<JSON>: another input of the manager module, its value as JSON; repeatable.--tag key=value: a Terraform default tag of the manager's resources; repeatable. The tags given replace the install's tags (--tag ''alone removes them all); without--tag, the stored ones are kept. They are the provider'sdefault_tagsof the manager's resources, after the fixed ones; the bootstrap's resources keep the fixed tags. Keys are compared without regard to case, as IAM does:Projectcollides withproject,Teamwithteam.--build-role <arn>: an existing role for CodeBuild instead of the one the install creates; it must trust CodeBuild.--management-profile <profile>: the management account's profile, for organization access.--member-role <name>: the role assumed in each member account from the management account (OrganizationAccountAccessRoleby default).--accounts <id>[,<id>...]: the member accounts that get the roles (every active account by default).--exclude-accounts <id>[,<id>...]: member accounts left out.--discovery-only <id>[,<id>...]: member accounts that get the discovery role but not the command role: the manager reads them, and cannot put their workloads to sleep.--access: runs organization access alone, the manager being installed (needs the management account's profile).--adopt-state <file>: the state of a manager installed with the Terraform module directly (terraform state pull), taken over by a first install: see Adopting a manager installed with Terraform.--adopt-module <name>: the manager module's name in that state (managerby default, asmodule "manager").--yes: takes the suggested answers without asking; never confirms a plan.--verbose: prints Terraform's lines instead of the status line.
Organization access
Organization mode needs the delegation policy in the management account and, in each other account, the discovery role
(and the command role, where workloads nap) trusting the manager. They are deployed with the management account's
credentials: --management-profile <profile>, or --profile when it is the management account's.
dormeto aws install --profile <manager-account-profile> --management-profile <management-profile>
- The CLI plans it read-only, shows it (the delegation policy as it would be, the accounts and the roles each gets),
and after your confirmation one build in the management account applies it. That build's role and project
(
dmt-<env>-organization) are created by API calls for the run, and deleted when it ends; the bucket stays, with the reports. Detached,dormeto aws install statusdeletes them once the build ends. - The member role is
--member-role(OrganizationAccountAccessRoleby default: the accounts that AWS Organizations created have it, the invited ones do not). An account where it cannot be assumed is left out and listed, with the procedure for it. - An account that already holds another manager's Dormeto roles or boundary is left out and listed: a boundary named
DmtRouterBoundaryis shared by every Dormeto role, so one account holds one manager's. - The manager's own account (its roles come from the manager module) and the management account (the member role is not
there, and AWS advises no workloads in it) get no roles by default.
--accounts,--exclude-accountsand--discovery-onlynarrow the rest. - The delegation policy is merged, not replaced: Dormeto's statement
DormetoReadOrganizationis added or updated, the other statements are kept. The organization has one such policy: a Terraform configuration that writes it whole (the release's organization module) removes the merged statement at its next apply.
Without the management account's credentials, organization access is disabled: the manager is installed all the same,
but it cannot list the accounts until the delegation policy exists, nor read an account without its roles. Deploy them
with the procedure, https://dormeto.com/organization-access.html, and check them with
dormeto aws install check --management-profile <profile>.
Without a terminal, dormeto aws install apply --management-profile <profile> deploys organization access: after the
manager's plan when there is one to apply, alone when there is none.
Status, upgrade, uninstall
dormeto aws install status shows where the install stands: a running build, followed; the manager's version and the latest
release; the last plan and apply; the dashboard and the invitations; organization access.
An upgrade is dormeto aws install again (--version <newer> for a given release): the answers of the last run are reused,
nothing already answered is asked, then the plan is shown and confirmed as before. Organization access runs again when
you give the management profile (its script is idempotent); without it, the release's notes may ask for the roles to
be applied again.
dormeto aws uninstall removes the manager, in this order:
- It refuses while routers are installed: offboard the workloads and uninstall the routers in the dashboard first. It asks you to confirm that event-driven refresh is off.
- The deletion protection is lifted by a plan, shown, confirmed and applied.
- The destroy plan is built, shown and confirmed; that saved plan is applied and followed.
- If you say so, the install's bucket (its state and answers), role, log group and project are removed.
Organization access is kept: its roles keep working for a reinstall. To remove them and Dormeto's statement of the delegation policy, see https://dormeto.com/organization-access.html.
Without a terminal, dormeto aws uninstall stops after each plan: dormeto aws install apply applies the deletion protection's,
dormeto aws uninstall apply the destroy plan, which keeps the bootstrap (a run with a terminal removes it on request).
dormeto aws install apply refuses a destroy plan, and dormeto aws uninstall apply an install plan. uninstall takes
--profile, --region, --env, --verbose and --yes, which here answers that event-driven refresh is off and
keeps the bootstrap; it never confirms a plan.
The plans of uninstall run with the version installed, not with a later plan's (an upgrade not applied). When that
version came from a local release, --release <dir> gives that release's directory again.
Updating from the dashboard
A manager installed by CLI 0.2.0 or later with manager 0.12.0 or later can be updated from its dashboard, by its
administrators. The install sets up an EventBridge rule, dmt-<env>-install-requests, that starts the install project
when the manager's API drops a request in the install bucket (<env>/requests/), through a role,
dmt-<env>-install-events, that may start that project only. The rule passes nothing the API wrote: the build reads
its request itself and checks it. The dashboard can request a plan of a newer published version, or of a version staged
by the CLI (--release), with the configuration last applied (applied/), then the apply of that plan. The build
checks every request (its fields, its version, that the plan it applies is the current one) and refuses what does not
pass; dormeto aws install status shows the dashboard's builds as the last dashboard update. The CLI records its version
in <env>/cli.json, which the dashboard reads to know the install can be updated.
--build-role leaves it off: the rule, its role and the manager's access to the bucket are not created, and the
dashboard says the install cannot be updated there. dormeto aws uninstall removes the rule and its role. An install made
with an older CLI gets it by running dormeto aws install once more with this one.
Adopting a manager installed with Terraform
A manager deployed with the Terraform module directly can become an install of the CLI without being recreated: its users, its history and the registration of its routers stay. The CLI takes the manager module's part of that configuration's state and makes it the install's own state; Terraform then plans the difference between the resources as they are and the CLI's configuration.
terraform -chdir=<the configuration that installed it> state pull > manager.tfstate
dormeto aws install --profile <profile> --region <region> --env <env> --adopt-state manager.tfstate \
--admin-emails you@example.com --domain <host> --certificate-arn <arn> --zone-id <id> --var name=<JSON>
- Give the inputs of that configuration with the flags and
--var: the CLI does not read its variables. Read the first plan before applying it: it shows any difference, and flags what it replaces or destroys. --adopt-module <name>names the module in that state when it is notmodule "manager".- The checks refuse an environment already installed with the CLI (it has an
install.jsonor anapplied.json), a state that is not of format version 4 or that a Terraform newer than the install's wrote, and a state whose module does not hold this environment's manager (its functiondmt-<env>-manager-api) in the profile's account and region. The manager found is then the one adopted, not another install; Dormeto's roles found are the adopted manager's when the state moves each of them. Another state already at<env>/manager.tfstate(an earlier adoption, interrupted) stops it too, with how to start over. - The resources of the module, and of the modules in it, move to the install's module; the resources outside it (a certificate, for example) stay in the source and are listed. Its outputs and check results are left out.
- After the bootstrap, before the plan, the install's bucket gets the state as it was read (a backup,
<env>/adopted/<UTC time>.tfstate), then the moved state (<env>/manager.tfstate, only when there is none), andinstall.jsonrecords where it came from (adoptedFrom: the file's name and SHA-256;adoptedModule). - The CLI never reads or writes the source's backend. After the first apply, it says how to detach the manager from the
source:
terraform state rm module.<name>there, then remove the module from that configuration. While both states name the resources, applying the source configuration again would fight the install. - Until the first apply,
dormeto aws uninstallrefuses: destroying would delete the adopted manager. To abandon the adoption instead, remove<env>/install.jsonand<env>/manager.tfstatefrom the install's bucket; the source state is untouched, and the bootstrap can stay or be removed by hand.
Permissions to install
The install's profile needs administrator rights in the manager's account: the checks simulate the actions of the
bootstrap (the bucket, the role, the project, the log group, and the rule that starts the install build on a dashboard request with its own role) and iam:PassRole, and the install is refused when one is
denied. The build role the install creates gets the AdministratorAccess managed policy in that account only, since the
manager module creates IAM roles, Lambda functions, a user pool, a distribution and tables; it is trusted by CodeBuild
for the install's project only. --build-role gives your own role instead, and dormeto aws uninstall removes the one the
install created.
That role keeps AdministratorAccess until dormeto aws uninstall (it serves the upgrades). Anyone allowed
codebuild:StartBuild or codebuild:UpdateProject on the project dmt-<env>-install can therefore run commands as an
administrator of that account: allow those actions to the install's operators only, or give your own role with
--build-role.
In the management account, the profile reads the organization (organizations:DescribeOrganization, ListAccounts,
DescribeResourcePolicy), assumes the member role in each chosen account (sts:AssumeRole; there iam:GetRole and
GetPolicy read the Dormeto roles), and creates and deletes the organization build's bucket, role, project and log
group. The build's role has no managed policy: only a scoped one.
sts:AssumeRoleonarn:aws:iam::*:role/<member role>, in the organization's accounts only (aws:ResourceOrgID)organizations:DescribeResourcePolicy,PutResourcePolicy,ListAccountss3:GetObject,PutObject,ListBucketon the install's bucketlogs:CreateLogStream,PutLogEventson its log group
Through the member role, the build runs Dormeto's release script, which creates or updates the two Dormeto roles and the boundary in each account: the member role must be allowed to do that (the role AWS Organizations creates is an administrator).
Routers and workloads
From CLI 0.4.0 and manager 0.15.0, dormeto calls the manager's API, with the AWS profile that dormeto aws install uses,
on its IAM-authorized /iam/* routes (see Permission); nothing is installed. From
CLI 0.6.0, every operation of the manager is a command, a verb per action of the dashboard: this section has the
routers and the workloads, then come Discovery and exclusions, Operations,
Users and groups, Audit, savings and alerts,
The manager and Raw calls. What they all share comes first: where the manager is, how
targets, confirmations, operations and output work, the exit codes and the permission.
dormeto aws whoami
dormeto aws routers list --env dev --outdated
dormeto aws workloads list --tag team=payments --state ASLEEP
dormeto aws workloads wake prod-eu/w-1 --wait
dormeto aws routers upgrade --all --dry-run
dormeto aws routers upgrade --all --yes --json > upgrade.json # in CI
Where the manager is
Every manager command takes --profile (the AWS profile; the SDK's default), --region (the manager's region; the
profile's by default), --env (the manager's environment, prod by default) and --api-url. The API is found by its
name, dmt-<env>-manager-api, in the manager's region; --api-url gives its URL and skips the lookup. When no API has
that name, the message says which environment and region were searched. --api-url is the API's execute-api endpoint
(the module's api_endpoint output, https://<api id>.execute-api.<region>.amazonaws.com), not the dashboard's URL.
dormeto aws whoami [--json]
whoami shows the caller as the manager names it (the profile's identity, by its ARN) and its role, then the manager
that answered: its version, its API's URL, the environment it was found by (not with --api-url) and its region. Run
it first to check the profile and the permission. --json prints {me, version, apiUrl}.
What every manager command shares
- Targets. A router is its name. A workload is
<router>/<workload id>; the workload writes take several, or--tag key=value(repeatable; every workload that carries all the tags, all pages of the listing), never both, and a--tagthat matches nothing exits 2. When a router does not answer (or the listing cannot be completed), the workloads resolved are acted on, then the command names what could not be resolved and exits 1 (--waitstill waits for the resolved ones). A discovery candidate is its id (the target group's ARN) or the name of its target group when it is unique among the candidates of the status the command works on; an ambiguous name exits 2 and lists the matching ARNs. A user is an email, a group a name, an operation and an exclusion their id. - Regions.
--regionis always the manager's region. A router's region is--router-region(routers list,upgrade,install), a candidate's--candidate-region(discovery candidates). - Confirmation. On a terminal, a write on several workloads or routers is confirmed, and these always are, even for
one target:
routers uninstall,workloads offboard,workloads exclude,exclusions add,users disable,users role,groups delete,discovery config setandmanager update. The question names the targets and what happens; a workload write lists its targets first (Offboard 1 workload?). Without a terminal,--yesis required (exit 2). A declined confirmation sends nothing and exits 0.--dry-run, where a command has it, lists the targets and sends nothing. - Operations. Onboarding, offboarding, the install, upgrade and uninstall of routers, exclusions and their lifting,
and the manager's update are operations of the manager. The CLI starts them and follows them, reading each every 5
seconds:
started <type> <id> for <target>, each step on stderr as it changes (… install router,✓ verify router (12s)), then✓ <target>: <type> succeeded in 3m12sor✗ <target>: <type> failed at <step>: <detail> (operation <id>). A start the manager refuses is printed with its message; the others go on, and the exit is 1. An operation that another one holds is refused with that one's id:(operation <id>: dormeto aws operations watch <id>). - Following.
--no-waitprintsfollow it: dormeto aws operations watch <id>instead of following.--timeout(60m by default) and Ctrl-C stop following: the operations go on in the manager, and the CLI prints<target>: still running in the manager: dormeto aws operations watch <id>for each one (exit 1; 130 on Ctrl-C). A wake, a keep-awake and a discovery run are not operations:--waitwaits for them, with their own--timeout. - Durations and times.
--fortakes a duration:90m,2h, or whole days first,3d,1d12h.--untiltakes an RFC 3339 time orHH:MMtoday in the local time zone, refused when already past (it never means tomorrow). Each command's limit is the manager's: 7 days forkeep-awake, 366 days for pauses and exclusions. - Checks. A value the manager checks is checked before anything is sent where the rule is known (exit 2, nothing sent), never more strictly than the manager does.
- Output. Lists are tables;
showcommands print labelled lines. Times in lists are ages (45m,3h,2d); inshow, the audit and operations, local times with their zone (2026-10-21 14:05 CEST). The manager's refusals are printed as it words them, on stderr. - JSON. Every command has
--json: the manager's answer, after the CLI's own filters, on stdout alone; lines, progress, questions and dry-run lists then go to stderr, so that stdout always parses:- a list prints the API's object, its rows under the API's key after the filters, every page in it and no page's
cursor (
{users: […]},{operations: […]},{candidates: […]}); - a command that starts operations prints them as an array when it takes several targets (
routers uninstall,workloads offboardandexclude,exclusions lift), whatever their number,[]when none started, and as an object when it takes one (routers install,workloads onboard,exclusions add),{}when it did not start; - the other writes on several targets print the manager's answers by target (
<router>/<workload>, or the router),{}when none succeeded; - a dry run prints
{"dryRun": true, "targets": […]}and a declined confirmation{"confirmed": false, "targets": […]}(exit 0);routers upgradeandmanager updateprint their own result instead.
- a list prints the API's object, its rows under the API's key after the filters, every page in it and no page's
cursor (
Exit codes
- 0: success (and a declined confirmation, which sends nothing).
- 1: AWS or the manager refused, an operation or an upgrade failed or did not start, a workload failed to wake, an
operation or a wait was not followed to its end (
--timeout), a--tagselection was incomplete, ordormeto aws apigot a status other than 2xx. - 2: a bad flag or argument, or no
--yeswithout a terminal. - 128 plus the signal's number when SIGINT or SIGTERM stopped the command (130 for Ctrl-C).
Permission to call the manager
The caller needs execute-api:Invoke on the manager API's /iam/* routes, with credentials of the manager's account (a
caller from another account assumes a role there that has it). Whatever it may call, such a caller acts as an
administrator of the manager, outside its MFA policy: the audit log, the operations, the pauses and every change name
its ARN. Its IAM policy is the only limit: grant it the routes, by method and path, that its commands call. Three
policies, from the narrowest.
Read-only. Every command that only reads: the lists, show, history, idle-window, schedule show, whoami,
overview, audit, operations watch, manager status and changes, and the --dry-run of the writes (but
manager update --dry-run, which plans):
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:<region>:<account>:<api id>/*/GET/iam/*"
}]
}
It still reads everything an administrator reads through the /iam/* routes: the users and their emails, the audit,
the update state.
Wake and nap. Check the caller (whoami), read the workloads (workloads list, show, history, idle-window,
the --tag selections), wake them (--wait included) and nap them, and nothing else:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "execute-api:Invoke",
"Resource": [
"arn:aws:execute-api:<region>:<account>:<api id>/*/GET/iam/me",
"arn:aws:execute-api:<region>:<account>:<api id>/*/GET/iam/health",
"arn:aws:execute-api:<region>:<account>:<api id>/*/GET/iam/workloads",
"arn:aws:execute-api:<region>:<account>:<api id>/*/GET/iam/workloads/*",
"arn:aws:execute-api:<region>:<account>:<api id>/*/POST/iam/workloads/*/wake",
"arn:aws:execute-api:<region>:<account>:<api id>/*/POST/iam/workloads/*/nap"
]
}]
}
Add .../POST/iam/workloads/*/pause and .../POST/iam/workloads/*/resume for keep-awake, pause and resume.
Every route. Every command, the writes included. The manager module's output api_iam_arn is this resource:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:<region>:<account>:<api id>/*/*/iam/*"
}]
}
For another policy, start from the read-only one (every command reads with GET) and add the routes of the writes it
needs; in a resource, each {…} of a path is * (.../POST/iam/routers/*/pause):
| Command | Route it writes, under /iam |
|---|---|
routers install, upgrade, uninstall, workloads onboard, offboard |
POST /operations |
routers pause, resume |
POST /routers/{router}/pause, POST /routers/{router}/resume |
workloads wake, nap, pause and keep-awake, resume, rename |
POST /workloads/{router}/{id}/wake (nap, pause, resume, rename) |
workloads tags |
PUT /workloads/{router}/{id}/tags |
settings set |
PUT /settings/workloads |
routers settings |
PUT /routers/{router}/settings |
workloads settings |
PUT /workloads/{router}/{id}/settings |
routers description |
PUT /routers/{router}/description, DELETE on the same path |
workloads description |
PUT /workloads/{router}/{id}/description, DELETE on the same path |
workloads waiting-page set, clear |
PUT /workloads/{router}/{id}/waiting-page, DELETE on the same path (these give custom HTML on the application's address, see Waiting page) |
routers waiting-page set, clear |
PUT /routers/{router}/waiting-page, DELETE on the same path (gives custom HTML on the application's address too) |
settings waiting-page set, clear |
PUT /settings/waiting-page, DELETE on the same path (gives custom HTML on the application's address too) |
workloads schedule set, clear |
PUT /workloads/{router}/{id}/schedule, DELETE on the same path |
workloads exclude, exclusions add |
POST /exclusions |
exclusions lift |
DELETE /exclusions/{id} |
discovery run, dismiss, restore |
POST /discovery/run (dismiss, restore) |
discovery config set |
PUT /discovery/config |
users invite |
POST /users |
users role, groups |
PUT /users/{email}/role, PUT /users/{email}/groups |
users disable, enable, resend, reset-mfa |
POST /users/{email}/disable (enable, resend, mfa/reset) |
groups create, update, delete |
POST /groups, PUT /groups/{name}, DELETE /groups/{name} |
savings discounts |
PUT /savings/settings |
manager check |
PUT /update/check |
manager update |
POST /update/plan, POST /update/apply |
A manager installed with the CLI has no Terraform outputs at hand: find the API id by the API's name, then build the ARN with it:
aws apigatewayv2 get-apis --query "Items[?Name=='dmt-<env>-manager-api'].ApiId" --output text
To find the API by name, the caller also needs apigateway:GET; --api-url does without.
Versions: every command needs manager 0.15.0 or later (the /iam/ routes): an older one answers Not Found, and the
CLI says to update it. A command a router is too old for is refused with the version to upgrade it to, printed as the
manager words it: routers show and the pauses need routers 0.16.0, workloads rename 0.20.0, workloads tags 0.30.0,
schedules 0.31.0, hibernation settings 0.32.0 (and manager 0.19.0). The manager refuses to demote or disable its last
enabled administrator from manager 0.18.0 (409, "the last administrator: give the admin role to another user first");
an older manager does not, and the CLI does not check it itself, so there users role and users disable can leave no
person able to administer the manager.
routers list
dormeto aws routers list [--account <id>]... [--router-region <region>]... [--name <glob>] [--tag k=v]... [--outdated] [--json]
Lists each router's name, account, region, source (manager or terraform), version (0.29.0 → 0.30.0 when below the
version available, upgrading while an upgrade runs), health and workloads (the total and the count per state), then a
last line with the version available and how many routers are outdated. A router that does not answer is listed, its
error on stderr.
--outdated: only the routers below the version available.--account <id>: only the routers of these AWS accounts.--router-region <region>: only the routers in these regions (--regionis the manager's).--name <glob>: only the routers whose name matches the glob (*,?,[…]).--tag key=value: only the routers that serve a workload carrying this Dormeto tag.--json: the API's answer, its rows after the filters.
--account and --router-region take repeated or comma-separated values, of which one must match. --tag is
repeatable and all the tags must be carried by the same workload. The tags are those of the workloads in the manager (see
workloads list), not AWS tags on the routers; a router that does not answer has unknown workloads' tags, so a --tag
cannot select it (a warning says so).
routers upgrade
dormeto aws routers upgrade [<router>...] [filters] [--all] [--concurrency <n>] [--timeout <d>] [--dry-run] [--yes] [--json]
dormeto aws routers upgrade --tag team=payments
dormeto aws routers upgrade --all --dry-run
Upgrades the routers named, narrowed by the filters, to the version available. Without a name or a filter, --all is
required (exit 2); --all takes neither names nor filters. An unknown name exits 2.
It prints the plan: each router to upgrade, from → to, then the routers skipped and why. A router is skipped when it is:
- written in Terraform (upgraded with its Terraform);
- up to date;
- newer than the version available;
- of unknown version (its error is given);
- busy with an operation (the operation's type and id are given).
The plan is confirmed on a terminal. Without one, --yes is required (exit 2 after the plan). A declined confirmation
starts nothing and exits 0. --dry-run prints the plan and stops. Then one upgrade-router operation per router is
started in the manager, at most --concurrency at once, and followed every five seconds; each result is printed as it
ends (the version change and the duration, or the step that failed, its detail and the operation's id).
--concurrency <n>: how many upgrades run at once, from 1 to 20 (4 by default).--timeout <duration>: stop following the upgrades after this long (60m by default). Ctrl-C does the same: the upgrades already started go on in the manager, and the CLI says where to follow them (its Operations view). Routers not yet started are not started (statusnot started); a network error while following is waited out until the timeout.--dry-run: print the plan and stop.--yes: do not ask for confirmation.--json: print the result on stdout as{available, upgraded: [{router, from, to, operation, status, error?}], skipped: [{router, reason}]}; the plan and the progress go to stderr.--all,--account,--router-region,--nameand--tag: the selection, as forrouters list.
routers show
dormeto aws routers show <router> [--json]
Shows one router as it tells its details: its version and build, its health and problems, the idle check (its schedule
and last run), the Lambda and queue figures, the workloads by state, the pauses, the EKS clusters (each says whether the
router reaches it directly or through its proxy function in the cluster's VPC, with the proxy's name and version; router
0.33.0 or later, and no version when the proxy did not answer the check's ping) and the IP lists, then each
configuration value with where it is set (terraform: the router's module; manager). Times are in the local
time zone. --json prints the manager's answer.
routers install and uninstall
dormeto aws routers install --account <12 digits> --router-region <region> [--no-wait] [--timeout <d>] [--json]
dormeto aws routers uninstall <router>... [--dry-run] [--yes] [--no-wait] [--timeout <d>] [--json]
dormeto aws routers install --account 111122223333 --router-region eu-west-3
dormeto aws routers uninstall staging-eu --yes --no-wait
installstarts the manager's install of a router in the account and region (aninstall-routeroperation) and follows it. The account needs the command role the manager assumes: without it, the manager refuses (no_access) and the CLI prints why.uninstallstarts anuninstall-routeroperation for each router, 3 at once at most, and follows them. It is always confirmed on a terminal. The operation's "check empty" step refuses a router that still has workloads: offboard them first.--json: the operations, as the manager last said them:install's as an object ({}when it did not start),uninstall's as an array ([]when none started).
routers pause and resume
dormeto aws routers pause <router>... --reason <text> [--for <duration> | --until <time>] [--keep-asleep] [--dry-run] [--yes] [--json]
dormeto aws routers resume <router>... [--dry-run] [--yes] [--json]
dormeto aws routers pause prod-eu --reason "database migration" --for 3h
dormeto aws routers resume prod-eu
pause: none of the routers' workloads is napped automatically, and the workloads asleep are woken unless--keep-asleep(the woken ones are printed).--reason(1 to 256 characters) is shown in the manager.--foris up to 366 days,--untilwithin 366 days; without either, the pause lasts untilrouters resume.resume: the workloads follow their schedule and idle rules again; a router that was not paused saysnot paused.- Several routers are confirmed on a terminal. A router refused does not stop the others (exit 1).
--jsonprints the manager's answers, by router ({}when none succeeded, the answers collected when Ctrl-C stops it); the lines go to stderr.
workloads list
dormeto aws workloads list [--state <state>]... [--router <name>] [--tag k=v]... [--search <text>] [--json]
Lists each workload's router, id, name, state, Dormeto tags (key=value, sorted by key) and the time since its last
change, then a last line with the total. A router that does not answer is reported on stderr, the others are listed.
--state <state>: only the workloads in these states (repeatable or comma-separated; case-insensitive).--router <name>: only the workloads of this router.--tag key=value: only the workloads with this Dormeto tag (repeatable: all must match).--search <text>: only the workloads whose name or id contains the text.--json: the API's answer.
workloads show, history and idle-window
dormeto aws workloads show <router>/<workload> [--json]
dormeto aws workloads history <router>/<workload> [--days 1..31] [--json]
dormeto aws workloads idle-window <router>/<workload> [--json]
show: one workload as the manager's workload view shows it: its state and since when, name, URL, account and region, router version and tags, its settings, its pauses (who, why, until when), its schedule with the next events (in the schedule's time zone), the share of the last 7 days in each state, its idle hours, and what its naps saved, with the energy not used.history: from the manager's store, never the router: the time in each state over--days(1 to 31, 7 by default), the wakes (how many, the median and the longest, the failed ones) and the savings estimate, then the latest 50 changes, newest first, with what started each and how long a wake took.--jsonhas every change.idle-window: the manager's advice on the idle window: the last 14 days of requests replayed against windows from 5 to 120 minutes, each with its savings a month (hours asleep a day when nothing is priced), its wakes and wait a day, the current and the recommended window marked. The manager computes it once a day: the first read may take a while.
Waking, napping, pausing, renaming and tagging workloads
dormeto aws workloads wake <target>... | --tag k=v... [--wait] [--timeout <d>]
dormeto aws workloads nap <target>... | --tag k=v...
dormeto aws workloads pause <target>... | --tag k=v... --reason <text> [--for <duration> | --until <time>] [--keep-asleep]
dormeto aws workloads rename <router>/<workload> <name>
dormeto aws workloads tags <target>... | --tag k=v... [--set k=v]... [--unset k]... [--clear]
dormeto aws workloads wake prod-eu/w-1 --wait
dormeto aws workloads nap --tag env=dev --yes
dormeto aws workloads pause --tag team=payments --reason "load test" --until 18:00 --yes
dormeto aws workloads rename prod-eu/w-1 "checkout api"
dormeto aws workloads tags prod-eu/w-1 --set team=payments --unset owner
wakeasks the routers to wake the workloads now.--waitreads each one every 5 seconds untilAWAKE, askeep-awake --waitdoes:FAILEDends it with the failure (exit 1),--timeout(15m by default) names the workloads not awake (exit 1), Ctrl-C exits 130.napasks the routers to put the workloads to sleep now. A router refuses a workload that is paused or not awake: its reason is printed for that workload, and the exit is 1.pause: the routers do not put the workloads to sleep, and wake them first unless--keep-asleep.--reason(1 to 256 characters) is shown in the manager.--foris up to 366 days,--untilwithin 366 days; without either, the pause lasts untilworkloads resume.renamesets the display name of one workload: 1 to 64 characters, no control characters. Routers 0.20.0 and later; the router refuses a workload written by Terraform.tagsreads each workload's tags, empties them with--clear, removes every--unsetkey, adds every--set, and sends them only when they changed (unchangedotherwise). Tags are given by flags alone, since a key may hold/; a key given twice is refused (exit 2). The manager's rules are checked first: at most 50 tags, a key of 1 to 128 characters, a value of up to 256, letters, digits, spaces and_ . : / = + - @, no key starting withdormeto:. Routers 0.30.0 and later.- More than one target is confirmed on a terminal, its targets listed before the question;
--yesskips it and is needed without one;--dry-runlists the targets and sends nothing. The other workloads go on when one is refused, and the exit is 1.--jsonprints the manager's answers of those that succeeded, by<router>/<workload>({}when none did); the lines and failures go to stderr. For a workloadtagsleaves unchanged, the answer is its tags as they are, in the manager's shape:{workloadId, tags}.
Keeping workloads awake and scheduling them
From CLI 0.5.0, workloads also keeps workloads awake for a while and sets their weekly schedules (awake and nap
windows, a maximum nap that wakes for maintenance). Targets are <router>/<workload id> arguments, or
--tag key=value, as for the other workload writes: more than one target is confirmed on a terminal, --yes skips it
and is needed without one, --dry-run lists the targets and sends nothing, and the other workloads go on when one is
refused (exit 1). From CLI 0.6.0, each of these commands has --json, as the other workload writes do.
dormeto aws workloads keep-awake <target>... | --tag k=v... (--for <duration> | --until <time>) [--reason <text>] [--wait] [--timeout <d>]
dormeto aws workloads resume <target>... | --tag k=v...
dormeto aws workloads schedule show <router>/<workload> [--json]
dormeto aws workloads schedule set <target>... | --tag k=v... --file <path or ->
dormeto aws workloads schedule clear <target>... | --tag k=v...
dormeto aws workloads keep-awake prod-eu/w-1 --for 2h --wait # in CI: wake, then wait until awake
dormeto aws workloads keep-awake --tag team=payments --until 18:30 --yes
dormeto aws workloads resume prod-eu/w-1 # at the end of the CI job
dormeto aws workloads schedule set --tag team=payments --file schedule.json --yes
dormeto aws workloads schedule show prod-eu/w-1
dormeto aws workloads schedule show prod-eu/w-1 --json | dormeto aws workloads schedule set prod-eu/w-2 --file -
keep-awakeposts a pause that leaves the workload awake (keepAsleep: false): it is woken when asleep and not put to sleep before the end.--foris a duration up to 7 days (90m,2h,3d,1d12h,168h);--untilis an RFC 3339 time orHH:MMtoday in the local time zone, refused when already past (it never means tomorrow) or more than 7 days away. One of them is required.--reasonis the pause's reason ("keep-awake from the CLI" by default). It works with any manager 0.15.0 or later: it uses pauses.--waitreads each workload every 5 seconds untilAWAKE(a workload whose status answers 4xx, or fails 3 times in a row, is dropped and the exit is 1). AFAILEDworkload ends it with its failure (exit 1),--timeout(15m by default) names the workloads not awake (exit 1), Ctrl-C exits 130. In each case the pause stays:workloads resumeends it.resumeends the pause, a keep-awake included.schedule setsends the file as it is (-for standard input) and the router validates it, its refusal is printed as it words it (exit 1). The file is the schedule's JSON:timeZone(an IANA name),windows(kindawakeornap,daysfrommontosun,startandendasHH:MMin steps of 5 minutes, anendnot after thestartends the next day,wakeneverorheaderfor a nap),exceptions(local dates) andmaxNapDays(1 to 60). It prints the next events. It needs manager 0.16.0 and routers 0.31.0 (older ones answer "upgrade the router to 0.31.0 or later").schedule showprints the time zone, the windows (awake mon–fri 08:30–19:00), the exceptions, the maximum nap and the next events in the schedule's time zone, every time labelled with its zone (Mon 26 Oct 08:00 CET; UTC, with a note, when the zone is unknown to the CLI).--jsonprints{schedule, next, maintenanceDue}:scheduleis left out for a router before 0.31.0 (the text output then says "the router does not report schedules (upgrade it to 0.31.0 or later)") and isnullwhen none.schedule set --file -takes that shape back (or a bare schedule) and sends itsschedulemember (byandatin it are accepted by the router); a file with no schedule (null,{"schedule": null}, or the output of a router before 0.31.0) is refused with exit 2.schedule clearremoves the schedule.
Hibernation
dormeto aws settings show [--json]
dormeto aws settings set --hibernate true|false [--json]
dormeto aws routers settings <router>... --hibernate true|false|inherit [--dry-run] [--yes] [--json]
dormeto aws workloads settings <target>... | --tag k=v... --hibernate true|false|inherit [--dry-run] [--yes] [--json]
dormeto aws settings show
dormeto aws settings set --hibernate false
dormeto aws routers settings prod-eu --hibernate inherit
dormeto aws workloads settings --tag env=dev --hibernate true --yes
From CLI 0.7.0, whether the EC2 instances that were launched with hibernation are hibernated, not stopped, when a workload naps is set at three levels; the most specific that is set wins: the workload, then its router, then the manager's default (on, for a router that reads none). Dormeto never launches or changes an instance: every other instance is stopped as before. A workload with fallback instance types does not hibernate unless it is set true on the workload itself (a hibernated instance cannot change type).
settings showprints the manager's default and who changed it and when:Hibernate: on (changed by ann at 2026-10-19 10:00 CEST).settings setchanges it (administrators) and prints what the manager says: the routers apply it at their next check, within 5 minutes.routers settingssets one router's value for the workloads that set none,inheritto follow the manager's default (administrators; routers 0.32.0 and later, an older one is refused with the version to upgrade it to).workloads settingssets a workload's own value,inheritto follow its router's (operators and administrators; routers 0.32.0 and later). A workload written by Terraform is refused (set hibernate in its workload module).- Several routers or workloads are confirmed on a terminal;
--yesskips it and is needed without one;--dry-runlists the targets and sends nothing. A refusal is printed for its target, the others go on (exit 1).--jsonprints the manager's answers (by router, or by<router>/<workload>). routers showprints ahibernateline in its configuration: its own value, orinherit (manager: on, read 2m ago)(; last read failed: <error>inside the parentheses when the last read failed), orinherit (built-in default: on)for a router that reads no manager settings. When the router has no value of the manager's yet (not read, or every read failed) it isinherit (manager: unknown, not read yet: naps stop)(the error in place ofnot read yetwhen there is one): the workloads are stopped, not hibernated, until it reads one.workloads showprints the value and where it comes from (on, from the router) and, when the router lists the instances and hibernation is on,2 of 3 instances were launched with hibernation; i-0abc is stopped instead. A workload with no standalone EC2 instance among its backends printsdoes not apply (standalone EC2 instances only)instead. While the router has not read the manager's settings it printsoff for now: the router has not read the manager's settings yet (naps stop); after 59 days hibernated it addsthe next nap stops the instances (a fresh boot after 59 days hibernated). Nothing is printed for a router before 0.32.0.
Descriptions
dormeto aws workloads description <router>/<workload> [--set <text> | --file <path or -> | --clear] [--json]
dormeto aws routers description <router> [--set <text> | --file <path or -> | --clear] [--json]
dormeto aws workloads description prod-eu/w-1
dormeto aws workloads description prod-eu/w-1 --set "Shop front, owned by payments"
dormeto aws routers description prod-eu --file runbook.md
cat notes.md | dormeto aws routers description prod-eu --file -
dormeto aws workloads description prod-eu/w-1 --clear
From CLI 0.7.0 (manager 0.19.0), a workload or a router can carry a short description in Markdown: what it is, who owns it, where its runbook is. The dashboard draws it; the CLI prints it as written.
- Without a flag, the command prints the text as written (raw Markdown), then
— ann@x.io, 2026-10-19 10:00 CEST(who wrote it and when), orno description. --setgives the text,--filereads it from a file (-for standard input),--clearremoves it; give at most one (more is a usage error, exit 2). The text is at most 4,000 characters and holds no control character other than line feed and tab; an empty--settext clears. A--filethat is empty, not UTF-8 text or over 64 KiB is refused (exit 2: use--clearto remove), a leading byte order mark is dropped. The manager's refusal is printed (exit 1). Reading reads the manager's store (GET .../description), so it works when the router cannot be reached; with a manager before 0.19.0 it isneeds manager 0.19.0 or later (…), notno description(exit 1).- A workload's description is written by operators and administrators, a router's by administrators.
--jsonprints{"description": …}, as the manager answers a read or a write. workloads showandrouters showprint the description, indented, under their header lines; nothing for none, or for a manager before 0.19.0.
Waiting page
dormeto aws workloads waiting-page show <router>/<workload> [--json]
dormeto aws workloads waiting-page set <router>/<workload> [--icon auto|none|<file>] [--title <text>] [--description <text>]
dormeto aws workloads waiting-page set <router>/<workload> --html <file or ->
dormeto aws workloads waiting-page clear <router>/<workload>
dormeto aws routers waiting-page show <router> [--json]
dormeto aws routers waiting-page set <router> [--icon auto|none|<file>] [--title <text>] [--description <text>] | --html <file or ->
dormeto aws routers waiting-page clear <router>
dormeto aws settings waiting-page show [--json]
dormeto aws settings waiting-page set [--icon auto|none|<file>] [--title <text>] [--description <text>] | --html <file or ->
dormeto aws settings waiting-page clear
dormeto aws settings waiting-page set --title "Acme portal" --icon ./logo.svg --description "Our test environments sleep at night."
dormeto aws workloads waiting-page set prod-eu/w-1 --title "Shop (staging)"
dormeto aws routers waiting-page set prod-eu --html ./waiting.html
cat waiting.html | dormeto aws workloads waiting-page set prod-eu/w-1 --html -
dormeto aws workloads waiting-page show prod-eu/w-1
dormeto aws workloads waiting-page clear prod-eu/w-1
The page a visitor sees while a workload wakes can carry your name, icon and words, or be your own HTML. One document is
kept per level: the workload, its router and the organization (settings waiting-page, for every router). The most
specific level with a document decides the mode; a template takes each of its icon, title and description from the most
specific template that has it. Needs routers 0.35.0 or later (an older router answers upgrade the router to 0.35.0,
exit 1) and a manager of 0.20.0 or later.
setreplaces that level's document.--title(at most 80 characters, one line),--description(at most 500 characters) and--iconwrite a template; a field left out is inherited.--icon autois the favicon the router reads from the application,noneshows no icon, and a file is a PNG, JPEG, WebP, SVG or ICO of at most 64 KiB, its type taken from its bytes (a file namedautoornoneis given as./auto;-is not read for an icon).--htmlwrites a custom page instead: a file or-for standard input, UTF-8, not blank, at most 256 KiB.--htmlwith any of the template's flags, orsetwith none of them, is a usage error. The icon and the page are checked before any call (exit 2).- A custom page runs scripts on the application's own address: it can read that site's cookies and call its API as the
visitor. In the dashboard, setting, replacing or clearing one needs an administrator. The CLI does not have that
check: the manager's
/iam/routes treat any principal of the manager's account that IAM allows to call them as an administrator, and IAM cannot tell a template from a custom page. Whoever mayPUTorDELETEawaiting-pageroute can therefore set custom HTML that runs on that application's address. Give thewaiting-pagewrite routes only to those you would trust with the application's users' sessions. Templates need an administrator for a router or the organization and an operator for a workload, in the dashboard. A workload written by Terraform is refused (exit 1): setwaiting_pagein its workload module. The page's warnings (nodata-dormeto="status"element, a Content-Security-Policy meta tag) are printed after the write, which goes through. A write at the organization also prints when routers apply it (within about a minute). showprints the effective mode, icon, title and description with the level each comes from (at the organization, theautoicon when it sets none), for a workload the cached favicon (its type, size and date, or why there is none), who set the level and when, and the warnings. An icon or a page is printed as its type and size, never its content;--jsonprints the manager's whole answer. At the organization,showsaysno waiting page setapart fromthe waiting page is not known: settings.json is unreadable.clearremoves the level's document, which then inherits.
Onboarding, offboarding and excluding workloads
dormeto aws workloads onboard <candidate> [--name <name>] [--idle-minutes <5..1440>] [--wake-mode any|browser]
[--database <id>|cluster:<id>]... [--fallback-type <type>]... [--set-tag k=v]...
[--hibernate true|false]
dormeto aws workloads offboard <target>... | --tag k=v... [--concurrency <n>] [--dry-run] [--yes]
dormeto aws workloads exclude <target>... | --tag k=v... --reason <text> [--for <duration> | --until <time>] [--dry-run] [--yes]
All three take --no-wait, --timeout <d> and --json: the operations, as the manager last said them, onboard's
as an object, offboard's and exclude's as an array.
dormeto aws discovery candidates
dormeto aws workloads onboard shop-staging --idle-minutes 30 --database cluster:shop-aurora --set-tag team=shop
dormeto aws workloads offboard prod-eu/w-1 --yes
dormeto aws workloads exclude prod-eu/w-2 --reason "under migration" --for 14d --yes
onboardstarts the onboarding of a candidate pending onboarding, given by its id (the target group's ARN) or the name of its target group, follows it, then prints the new workload asonboarded <router>/<workload id>. An unknown or ambiguous name exits 2 (its ARNs listed) and sends nothing. It sends what the dashboard's Onboard dialog sends:--name: the workload's display name, up to 64 characters (the target group's name by default, or when empty);--idle-minutes: the idle window, 5 to 1440 minutes (15 by default);--wake-mode:anyrequest that passes the filters (the default), orbrowser(only the waiting page's script or thex-dormeto-wake: 1header wakes it);--database: a companion RDS instance identifier, orcluster:<identifier>, stopped after the application and started before it (repeatable);--fallback-type: an EC2 instance type, such ast3a.medium, tried in order at a wake when AWS has no capacity for the instance's own type (at most 5; for the EC2 instances of a workload);--set-tag key=value: a Dormeto tag of the new workload (repeatable). It is--set-tag, not--tag, which selects targets everywhere else;--hibernate true|false: hibernation of its EC2 instances (see Hibernation); without it the workload inherits its router's setting, then the manager's.inheritis not a value here: leave the flag out.
offboardstarts the offboarding of each workload, at most--concurrencyat once (1 to 20, 4 by default): the workload is woken, its application given back as it was, and it leaves Dormeto. It is always confirmed on a terminal.excludeexcludes each workload's target group from discovery, with a reason: the manager pauses its managed workloads (anexcludeoperation).--reasonis 1 to 246 characters;--foris up to 366 days,--untilwithin 366 days; without either, the exclusion lasts untildormeto aws exclusions lift. It is always confirmed on a terminal.- A workload another operation holds is refused with that operation's id; the others go on (exit 1).
Discovery and exclusions
From CLI 0.6.0, discovery shows what the manager's discovery found, runs it, dismisses and restores candidates and
replaces its configuration, and exclusions lists, adds and lifts the manual exclusions. Targets, confirmations,
operations and output are as in What every manager command shares.
dormeto aws discovery status [--json]
dormeto aws discovery run [--wait] [--timeout <d>] [--json]
dormeto aws discovery candidates [--status <status>] [--account <id> [--candidate-region <region>]] [--limit <n>] [--json]
dormeto aws discovery dismiss <candidate>... [--note <text>] [--json]
dormeto aws discovery restore <candidate>... [--json]
dormeto aws discovery access [--limit <n>] [--json]
dormeto aws discovery config show [--json]
dormeto aws discovery config set --file <path>|- [--yes] [--json]
dormeto aws exclusions list [--json]
dormeto aws exclusions add (--target-group <arn> | --load-balancer <arn> | --account <id>) --reason <text> [--for <d> | --until <time>]
dormeto aws exclusions lift <id>... [--no-wait] [--timeout <d>] [--json]
dormeto aws discovery run --wait
dormeto aws discovery candidates --account 111122223333 --candidate-region eu-west-1
dormeto aws discovery dismiss legacy-admin --note "decommissioned in December"
dormeto aws discovery config show > discovery.json
dormeto aws discovery config set --file discovery.json
dormeto aws exclusions add --account 444455556666 --reason "production account" --yes
dormeto aws exclusions lift 5f0c2b7e-1d4a-4e8b-9c3f-7a2d6e1b8c40
discovery status and run
statusshows the last run (when, by whom, how many account-regions it scanned, skipped and failed), a Run now refused since, the candidates per status, the roles the manager uses and what the lint found. Times are in the local time zone.runasks the manager for a run now; it runs on its own. With--wait, the last run is read every 5 seconds until a run newer than the request has ended, then printed asstatusdoes; a run the manager refused, because another was in progress, exits 1. A read that fails for a passing reason (a network error, 429, 5xx) is waited out, as the following of an operation does. Ctrl-C and--timeout(30m by default) stop waiting, the run going on in the manager.--jsonprints the manager's answer, with--waitthe status once the run ended.
discovery candidates, dismiss and restore
candidateslists the candidates of one--status(pending-onboardingby default;pending-offboarding,managed,ineligible,dismissed,excluded,out-of-scope,gone): target group, account, region, hosts, idle hours and requests over 7 days, the workload or the operation running on it, and why it has that status. Every page is read unless--limitstops at that many (0, the default, reads all).--accountkeeps one AWS account,--candidate-regionone region of it (it needs--account;--regionis the manager's).--jsonprints the manager's answer,{candidates}, every page in it.dismisstakes candidates out of the pending onboarding, each given by its id, sent as it is whatever the candidate's status, or the name of its target group, resolved among the candidates pending onboarding before anything is sent: an unknown name, or one that names the target groups of several accounts or regions (their ARNs are listed), exits 2 and nothing is dismissed.--notesays why (cut at 256 characters).restorebrings dismissed candidates back, each id or name resolved among the dismissed ones in the same way.dismissandrestoreprint, with--json, the candidates as the manager answers them.
discovery access
access shows the organization access of the last run: how many accounts are ready, the delegation policy, the event
forwarders, and a table of the accounts that are not ready with what is missing (the discovery or the command role).
Every page is read unless --limit stops at that many accounts (0, the default, reads all). --json prints the
manager's answer, every page in it.
discovery config show and set
config showprints the configuration as JSON alone on stdout, so thatconfig show > discovery.jsongives a file thatconfig settakes, and what the lint finds in it on stderr.--jsonprints the manager's whole answer instead: the configuration as itsconfigmember, who set it and when, the lint.config set --file <path>replaces the whole configuration with the file (-reads standard input): the output ofconfig show, or the answer ofconfig show --json, whoseconfigmember is sent. It is always confirmed on a terminal. The manager checks it, and a refusal prints each of its errors on a line (exit 1).
exclusions
exclusions listlists the manual exclusions: id, target, reason, who excluded it, until when (local time zone), the workloads it paused by name, and its state (active,expired, orliftingwhile a lift runs).--jsonprints the manager's answer,{exclusions}.exclusions addexcludes one target from discovery: an application target group (--target-group <arn>), an application load balancer (--load-balancer <arn>) or a whole account (--account <12 digits>). The manager pauses its managed workloads (anexcludeoperation, followed).--reasonis 1 to 246 characters;--foris up to 366 days,--untilwithin 366 days; without either, the exclusion lasts until it is lifted. It is always confirmed on a terminal;--dry-runnames the target and sends nothing. It takes--no-wait,--timeout,--yesand--json(its operation, an object).exclusions lift <id>...lifts each exclusion (its id is inexclusions list) and follows the operations: the workloads it paused are resumed, then the exclusion is deleted. One that stays listed (a workload could not be resumed) is lifted again by running the command again. An exclusion another operation holds is refused with that operation's id, the others go on (exit 1).--jsonprints the operations, an array.
Operations
From CLI 0.6.0, operations lists the manager's operations, shows one and follows one, started from the CLI or the
dashboard.
dormeto aws operations list [--running] [--type <type>]... [--limit <n>] [--json]
dormeto aws operations show <id> [--json]
dormeto aws operations watch <id> [--timeout <d>] [--json]
dormeto aws operations list --running
dormeto aws operations list --type install-router,uninstall-router --limit 0
dormeto aws operations watch 5f0c2b7e-1d4a-4e8b-9c3f-7a2d6e1b8c40
listlists the operations, newest first by creation: id, type, target, status, current step, who started it (an ARN shortened to its last two parts) and its age.--runningkeeps those still running;--typethe types given (repeatable or comma-separated:onboard,offboard,install-router,upgrade-router,uninstall-router,exclude,lift-exclusion,update-manager, ...);--limitcaps the rows (50 by default; 0 for all).--jsonprints the manager's answer,{operations}, its records after these filters.showprints one operation: type, target, status, who started it, its times (local time zone) and error, then its steps with their status, how long each took and what it says.watchfollows an operation, printing its steps on stderr as they change, until it ends: exit 0 when it succeeded, 1 when it failed (with the failed step's detail). One already finished prints its outcome at once. Ctrl-C and--timeout(60m by default) stop following, the operation going on in the manager (exit 1; 130 on Ctrl-C).--jsonprints the operation as last read, on stdout. It is what--no-waitand a refused conflict point to.
Users and groups
From CLI 0.6.0, users and groups manage the people of the manager's dashboard and their custom groups. They manage
Cognito users: the CLI's own caller is an IAM principal, never one of them.
dormeto aws users list [--json]
dormeto aws users invite <email> --role <member|viewer|operator|admin> [--group <name>]... [--json]
dormeto aws users role <email> <member|viewer|operator|admin> [--dry-run] [--yes] [--json]
dormeto aws users groups <email> [<name>...] [--json]
dormeto aws users disable <email> [--dry-run] [--yes] [--json]
dormeto aws users enable <email> [--json]
dormeto aws users resend <email> [--json]
dormeto aws users reset-mfa <email> [--json]
dormeto aws groups list [--json]
dormeto aws groups show <name> [--json]
dormeto aws groups create <name> [--description <text>] [--grant <tags>:<permissions>]... [--json]
dormeto aws groups update <name> [--description <text>] [--grant <tags>:<permissions>]... [--no-grants] [--json]
dormeto aws groups delete <name> [--dry-run] [--yes] [--json]
dormeto aws groups create payments-dev --description "Payments, dev" --grant team=payments,env=dev:read,wake
dormeto aws users invite ana@example.com --role member --group payments-dev
dormeto aws users role ana@example.com operator
dormeto aws users groups ana@example.com # no group: clears them
users
list: email, role, custom groups, status (disabledwhen they are), whether their authenticator is set up, and the age of the account.--jsonprints the manager's answer,{users}.invite: the manager emails the user a temporary password.--roleismember(sees only what their groups grant),viewer,operatororadmin;--group, repeated, puts them in existing custom groups. The answer says whether the invitation was sent or waits for the address to be verified.rolesets the user's built-in role.groupssets their custom groups to those named, replacing their groups; naming none clears them (it applies at their next sign-in, within an hour).disablestops the user from signing in,enablelets them sign in again,resendsends the invitation again to a user who has not signed in yet,reset-mfaresets their authenticator (they set it up again at their next sign-in).roleanddisableare always confirmed on a terminal. From manager 0.18.0, the manager refuses to demote or disable its last enabled administrator, and the CLI prints its refusal (exit 1); see Permission for older managers.
groups
list: name, description, how many grants and the age of the last change (--json: the manager's answer,{groups}).show: the description, who changed it last and when, and each grant.create: the name is 1 to 48 lower-case letters, digits and hyphens, not starting withdmt-; the description at most 200 characters.updatechanges the description, or replaces the grants: the grants given replace the group's (takegroups showfirst to keep some);--no-grantsremoves them all. Give at least one of--description,--grantand--no-grants.- A grant is
<tags>:<permissions>, split at the last:: the permissionsread,wakeandnap, comma-separated, on the workloads that carry all the tags,key=valuecomma-separated (none: every workload), such asteam=payments,env=dev:read,wakeor:read. At most 20 grants. deleteremoves the group and its grants: its members lose what it granted at their next sign-in. It is always confirmed on a terminal.
Audit, savings and alerts
From CLI 0.6.0, the dashboard's readings: the overview, the audit log, the savings and their discounts, the alerts and the IP lists.
dormeto aws overview [--json]
dormeto aws audit [--since <duration|time|date>] [--action <action>]... [--who <text>] [--target <text>] [--limit <n>] [--json]
dormeto aws savings show [--json]
dormeto aws savings discounts --compute <0..90> --databases <0..90> [--json]
dormeto aws alerts list [--json]
dormeto aws ip-lists list [--json]
dormeto aws overview
dormeto aws audit --since 2d --action pause,resume
dormeto aws audit --who ci-deploy --limit 0 --json > audit.json
dormeto aws savings discounts --compute 20 --databases 15
overviewshows what the dashboard's Overview shows: the workloads by state, the share of the last 7 days in each state, the estimated savings, the open alerts, the running operations and the routers that are outdated. It reads six routes: one that fails is reported on stderr and its block left out (exit 1 at the end); one the manager does not have (404) is "not available" (nullin--json).--jsonprints{workloads: {total, byState}, states, savings, alerts: {open}, operations: {running}, routers: {total, outdated, available}}.auditshows the audit log, newest first (times in the local time zone): when, who (an ARN shortened to its last two parts), action, target and result, of every mutating call and refused action. The manager sends it whole; the filters are the CLI's:--sincea duration back from now (2d,12h), an RFC 3339 time or a date (YYYY-MM-DD, local midnight);--actionan action's name (repeatable or comma-separated, such aspauseoroperation-onboard);--whoand--targeta part of the text, in any case;--limitthe newest entries only (100 by default; 0 for all).--jsonprints{entries}as the manager sends them, after the filters.savings showshows the estimate of the daily job as the Savings card does: the last 30 days, this month, since the first day computed, Dormeto's own cost and the net, the top savers, what is not priced, and the discounts for commitments the prices are reduced by.savings discountssets those discounts, in whole percent from 0 to 90, off the list prices of compute (EC2, Fargate, EKS nodes) and of databases. Both are required (what is not given would be reset); they apply from the next day the job computes.alerts listlists the open health alarms (level, kind, name, age, problems), then the alert topic's subscriptions: how many are confirmed and pending, and each endpoint, masked.no alerts configuredwhen the manager has none.ip-lists listlists the manager's IP lists: name, action (defer: a request from a listed address does not wake a workload by itself;ignore: it never wakes one), entries, the age of the last download and its status. They are set withip_listsin the manager's Terraform.
The manager
From CLI 0.6.0, manager shows the manager's version and its update state, turns its daily check on or off, prints the
release notes and updates it, as the dashboard's Update page does. A manager installed with the CLI is updated by its
install build (see Updating from the dashboard); one installed with the Terraform module
is updated by changing the module's source.
dormeto aws manager status [--json]
dormeto aws manager check (--enable [--alert | --no-alert] | --disable [--no-alert]) [--json]
dormeto aws manager changes [--to <version>] [--json]
dormeto aws manager update [--version <version>] [--dry-run] [--yes] [--no-wait] [--timeout <d>] [--json]
dormeto aws manager status
dormeto aws manager changes
dormeto aws manager update --dry-run
dormeto aws manager update --version 0.18.0
statusshows the version the manager runs, how it was installed (with the CLI, whose install build updates it, or with Terraform), the version last applied, the newer versions (with their router version, or why one cannot be applied from the manager), the last install build, a request waiting for its build, the plan ready to apply and its summary, and the daily check (not availablein a manager without it).--jsonprints{version, update, check}.check --enablechecks daily for new versions,--disablestops it (and its alert:--no-alertmay say so,--alertis refused).--alertalso sends a new version to the alert topic,--no-alertstops that; with--enablealone the alert stays as it is.changesprints the release notes of the versions the manager offers, newest first, up to--to(the newest by default), with a note where a version asks for an access change that the update does not apply. A manager installed with the CLI only.updateplans the update to--version(the newest the manager offers by default) in the install build and follows it, prints the plan once the manager shows it (the resources to add, change and destroy, those replaced or destroyed), then, once confirmed (always on a terminal;--yeswithout one), applies that plan and follows it, and reads the version the manager then runs.--dry-runstops after the plan.--no-waitstarts the apply without following it (the plan is always followed: its summary is what is confirmed).--timeout(60m by default) applies to the plan and to the apply each; while the apply replaces the manager's API, a read that fails is tried again until then, each new error said once on stderr. A manager installed with Terraform is refused with that advice (exit 1).--jsonprints{update, operations}: the update's state as last read and the operations followed.
Raw calls
From CLI 0.6.0, dormeto aws api calls any route of the manager's API, signed with the profile, and prints its answer: the
escape hatch for what a later manager adds before the CLI has a command for it.
dormeto aws api <method> <path> [--data <json> | --data @<file> | --data -] [-q key=value]...
dormeto aws api GET /workloads -q state=ASLEEP -q limit=10
dormeto aws api GET /routers/prod-eu
dormeto aws api POST /routers/prod-eu/pause --data '{"reason":"maintenance"}'
dormeto aws api PUT /discovery/config --data @discovery.json
- The method is
GET,POST,PUTorDELETE; the path starts with/and is the route's under/iam(an/iamprefix is dropped), percent-encoded where a segment needs it.-q key=valueadds a query parameter (repeatable). --datais the body, sent as it is: JSON,@<file>, or-for standard input.- The answer's body is printed on stdout, indented when it is JSON. A
GETanswered 429 or 5xx is tried up to 3 times in all. Any status but 2xx printsHTTP <status>on stderr (the body still on stdout) and exits 1. --jsonchanges nothing: the body is the API's answer. It is accepted as every command accepts it.
Google Cloud
From CLI 0.8.0, dormeto gcp installs and runs a Dormeto router in a Google Cloud project, with the account of your
gcloud (its active configuration, or --gcloud-configuration <name>); nothing else is needed on your machine. The
router naps Compute Engine VMs and managed instance groups behind a global external Application Load Balancer, and a
visitor's first request wakes them. Every command takes --project (required) and, but check and status, --region
(required: the router is dmtr-<region>). Exit codes: 0; 1 when a command lacks a permission, a check fails or Google
refuses; 2 for a bad flag or a missing answer (an --yes without a terminal); 128 and the signal's number when stopped.
dormeto gcp check --project my-project --region europe-west1
dormeto gcp install --project my-project --region europe-west1 --image <registry>/router:0.35.0
dormeto gcp workloads onboard --project my-project --region europe-west1 \
--url-map shop-map --backend-service shop --idle-minutes 30
dormeto gcp workloads list --project my-project --region europe-west1
dormeto gcp uninstall --project my-project --region europe-west1
gcp checkis read-only: for each command, ✓ when you hold every permission it needs, ✗ with the missing ones otherwise, then the project's parent, the APIs already on and the warnings (the Compute Engine default service account's Editor grant).--jsonprints the report.gcp installchecks your permissions first (a ✗ stops it with nothing changed), prints the plan (the APIs to turn on, every IAM binding to add with its role, member, resource and condition, every resource to create), asks for confirmation (--yeswithout a terminal,--dry-runprints the plan only), applies it, prints the IAM policy difference after each step and verifies. It adds the APIs, the custom rolesdormetoRouteranddormetoRouterBackends, the service accountdmtr-<region>, its grants, the secure tagdormeto=managed(the router stops only VMs that carry it), the Firestore database and the Cloud Tasks queuedmtr-<region>, and records all of it, and the bindings Google adds by itself, in the documentinstall/recordof the database. With--imageit also installs the router: the Cloud Run servicesdmtr-<region>-controller, with the controller's invoker binding (roles/run.invoker, to the router's service account only), anddmtr-<region>-waker, with the waker's invoker check off (its ingress admits only the load balancer), the waker's network endpoint group and the check jobdmtr-<region>-check(every 5 minutes). Run again, it plans only the differences, and shows the project's bindings its record does not explain, recording those of Google's service agents. It never changes or removes a binding it did not add.gcp status(read-only,--json) shows the router's record and live state: version, services, controller health, queue, job, database and grants.gcp uninstallremoves exactly what install added, in reverse order, from the record. It refuses while workloads are onboarded (--forceoffboards each first, tag bindings included), keeps the roles and the tag while another router of the project lists them, turns no API off, and lists the APIs and Google's bindings as left in place. It prints every IAM change and warns of what the project's policy holds at the end beyond its bindings from before the install and Google's. A tag Google refuses to delete, still bound, is left and the record kept: run the same command again to finish. To reinstall in the same region, wait: Google may keep a deleted queue's name blocked for up to 3 days (a create can appear to succeed in that window, andgcp installthen says so), and a deleted database's ID for about 5 minutes.gcp workloadscall the router's controller with your identity token, so you needrun.routes.invokeon it (gcp checksays whether you hold it).gcp installdoes not give it to you: it grants the role to the router's service account only, so ask forroles/run.invokeron the controller if you lack it. If Terraform writes the load balancer or the VMs, it must ignore what the router changes: the fields are on the website's Google Cloud page.
| Command | What it does |
|---|---|
workloads list |
the router's workloads and their states |
workloads show <id> |
one workload: state, URL map, backend service, waker backend service, settings, backends |
workloads onboard --url-map <m> --backend-service <b> |
check the eligibility, tag the VMs and groups, onboard the workload awake |
workloads offboard <id> [--force] |
the controller wakes it if needed and restores every reference, then the tag bindings are removed; a workload that cannot wake is refused, and --force offboards it anyway, leaving its VMs and groups down (listed) |
workloads nap <id>, workloads wake <id> |
ask for a nap or a wake now: the controller answers at once and runs it through Cloud Tasks, so the state printed is the current one; follow it with workloads show (a wake asked during a nap is kept and runs once the nap ends) |
--json prints the controller's answer as it is. onboard first asks the controller for a dry run: a workload that is
not eligible is refused with the reasons and nothing is changed (--dry-run stops there). Then it binds the tag
dormeto=managed to each VM and managed group as you (the router itself holds no permission to tag, or it could tag any
VM and stop it), then onboards. --id is the workload's ID (lowercase letters, digits and dashes, at most 40
characters); it defaults to the backend service's name when that is a valid ID, else it is asked on a terminal and
exit 2 without one. The settings are optional: --idle-minutes (5 to 1440) and --hibernate true|false (suspend the VMs that can be suspended instead of stopping them); a value out of its range exits 2 before
any call. A binding of the dormeto=managed tag that was on a VM or group before the onboarding is treated as Dormeto's and removed at the offboarding. The permissions of onboard and offboard (the tag bindings of VMs and groups) are listed by gcp check.
How far Google Cloud has been tried. There are three levels, and the flags below belong to the last two.
- Accepted on a real project (2026-10-30):
gcp check,install,uninstall,statusandworkloads, and Compute Engine VMs (unmanaged and managed groups, suspended when possible) behind a global external Application Load Balancer. - Built and reviewed, its acceptance not run yet: regional and classic load balancers (
--load-balancer), zonal network endpoint groups, schedules and pauses (workloads schedule,pause,resume) and IP lists (--ip-list). Some of their behavior was measured on Google; no more than that. - Written, never run against Google: Cloud SQL companions (
--with cloud-sql,--cloud-sql) and GKE (--with gke,--gke-cluster,workloads access). Try them in a project you can lose: each command that takes one of these flags prints one warning on stderr to say so, and goes on.
There is no public router image: you build and push your own (scripts/gcp-image.sh in the router's repository; the
website's Google Cloud page has the steps). There is no dashboard or manager for
Google Cloud yet, and the branded waiting page does not apply to it.
Building from source
Go 1.26 or later; Node.js for the release scripts' tests; GoReleaser 2 for make snapshot and a release. make lists the targets:
make build # bin/dormeto, as a release builds it
make run ARGS="aws estimate --profile <profile> --uptime"
make test # go vet, the Go tests (shared cases, end to end), the scripts' tests
make install # into ~/.local/bin (INSTALL_DIR), then which dormeto runs
make uninstall # removes it
make snapshot # dist/: the release's archives, checksums and cask
make parity # the shared cases exported again from ../manager
make dry-run VERSION=0.1.0 # a release's checks, nothing published
make release VERSION=0.1.0 # publishes it (Releasing)
make after-release VERSION=0.1.0 # the checks after, safe to run again
make brew-linux # the Homebrew cask on Linux, with podman
Releasing
For maintainers. A release, from main:
make dry-run VERSION=0.1.0 # the checks and a snapshot in dist/, nothing published
make release VERSION=0.1.0 # the release commit, the tag, the GitHub release, the Homebrew cask, the next iteration
The notes are what CHANGELOG.md has under a leading ## Unreleased. Once the checks pass, the release turns that heading
into ## 0.1.0 and commits and pushes it (chore(release): cli 0.1.0), then tags that commit. A section already written
by hand as ## 0.1.0 is released from the commit it is in; notes in both places are refused. After the publication, the
next iteration puts an empty ## Unreleased back at the top, committed and pushed, unless one is already there. The
version itself comes from the tag, so there is nothing else to bump. With that section empty, a release stops: nothing to
release. Commits not yet on origin stop it too: only the release's own commits are pushed.
When the manager is released too, the CLI comes after it, since the checks refuse shared cases older than the manager's
latest release, and before the website, so that the website never describes a CLI that isn't out yet
(tools/release/dormeto-release in the vision repository drives the three; its cli command is this same release).
make release is scripts/release.sh <version> (for example 0.1.0, without a v), which checks the repository, tags,
publishes the GitHub release and the Homebrew tap with GoReleaser, and checks the result; make dry-run is the same with
--dry-run, which checks and builds without changing the changelog, publishing, tagging or reading the token. It stops
with what was done and the commands that finish it if something fails after the release commit. The checks are: on
main, clean, equal to origin/main, no such tag, the notes in CHANGELOG.md, go vet and go test,
the shared cases not older than the manager's latest release, the Keychain item below, go mod tidy and
goreleaser check. npm is not a channel: 0.1.0's packages (@dormeto/cli) are deprecated, and no other version is
published there.
The checks after it, make after-release VERSION=<version> (scripts/after-release.sh, safe to run again), install the
version through each channel and run it: the release's archives against checksums.txt, the Homebrew cask (installed, or upgraded when it is), the
install script and go install. The install script is https://dormeto.com/install.sh, or, while that does not answer
(the website not deployed yet), the website checkout's site/install.sh: DORMETO_WEBSITE_DIR, by default
../website beside this repository.
make brew-linux [ARCHS="arm64 amd64"] (scripts/test-brew-linux.sh) is an opt-in check of the Homebrew cask on Linux, with podman: it builds a
snapshot, checks the cask's Linux entries against checksums.txt, serves dist/ locally, and in a homebrew/brew
container per architecture (by default the machine's own; Homebrew hangs under amd64 emulation on an ARM Mac) installs
the generated cask from a local tap and runs dormeto version. It removes its containers and server on every exit.
It publishes to two repositories of the Dormeto GitHub account (a personal account, not an organization), both public,
since Homebrew, the install script and go install download without a token: Dormeto/cli and the tap,
Dormeto/homebrew-tap (the name brew turns into dormeto/tap), created with a README so that GoReleaser adds the
cask, Casks/dormeto.rb, to a main branch that exists.
It reads one token from the macOS Keychain, the item github-dormeto for the account $USER. It is never written to
a repository or to a log. Create it, then store it with security, which asks for the value (-w last, with no value)
so it does not appear in a command line or the shell's history: on GitHub, signed in as Dormeto, Settings, Developer
settings, Personal access tokens, Fine-grained tokens, Generate new token, with Dormeto as resource owner, "Only select
repositories" cli and homebrew-tap, the Contents repository permission at Read and write (Metadata, read-only, comes
with it), and an expiration of 90 days.
security add-generic-password -U -a "$USER" -s github-dormeto -w
The release checks the token before it tags anything; an expired or revoked one stops it with a message. That check proves only that the token is valid (both repositories are public): its write grant is proven by the release itself, and a refusal there stops the release with the state report, what was done and the commands that finish it.
License
Documentation
¶
Overview ¶
Package cli holds the files embedded from the module root.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Versions []byte
Versions is testdata/parity/versions.json: the manager and router versions and the manager commit of the shared parity cases, written by the export.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dormeto
command
Command dormeto is the Dormeto command line.
|
Command dormeto is the Dormeto command line. |
|
internal
|
|
|
accounts
Package accounts says which accounts an estimate reaches (vision docs/specs/2026-10-10-savings-estimate-design.md §4, decision 4): an organization's active accounts when the profile may list them, else its own account only, and why.
|
Package accounts says which accounts an estimate reaches (vision docs/specs/2026-10-10-savings-estimate-design.md §4, decision 4): an organization's active accounts when the profile may list them, else its own account only, and why. |
|
aws
Package aws holds the adapters of the estimate's ports over the AWS SDK for Go v2: a profile's shared configuration (SSO sessions included), the accounts it reaches (STS, Organizations), an account's clients in a region (the scan's, what a nap stops, the EKS clusters and their API), the Price List and Spot price history.
|
Package aws holds the adapters of the estimate's ports over the AWS SDK for Go v2: a profile's shared configuration (SSO sessions included), the accounts it reaches (STS, Organizations), an account's clients in a region (the scan's, what a nap stops, the EKS clusters and their API), the Price List and Spot price history. |
|
awserr
Package awserr says an AWS error as the Node estimate says it: Node reads err.name and err.message (`${err.name}: ${err.message}` in accounts and discovery, err.message in the reasons of what a nap stops), where the AWS SDK for Go v2's Error() reads "operation error …, https response error …, api error Code: Message".
|
Package awserr says an AWS error as the Node estimate says it: Node reads err.name and err.message (`${err.name}: ${err.message}` in accounts and discovery, err.message in the reasons of what a nap stops), where the AWS SDK for Go v2's Error() reads "operation error …, https response error …, api error Code: Message". |
|
cache
Package cache ports estimate/src/cache.ts of the Node estimate (manager): the estimate's cache under ~/.cache/dormeto/estimate/<organization or account>/, byte-compatible with Node's files.
|
Package cache ports estimate/src/cache.ts of the Node estimate (manager): the estimate's cache under ~/.cache/dormeto/estimate/<organization or account>/, byte-compatible with Node's files. |
|
cli
Package cli is the estimate command (vision docs/specs/2026-10-10-savings-estimate-design.md §3, §8): the options, the accounts, the three phases with their progress, the reports and the summary.
|
Package cli is the estimate command (vision docs/specs/2026-10-10-savings-estimate-design.md §3, §8): the options, the accounts, the three phases with their progress, the reports and the summary. |
|
estimate
What the estimate assumes, as the reports say it.
|
What the estimate assumes, as the reports say it. |
|
fleet
Package fleet is the CLI's client of the manager's IAM-authorized API: the lookup of the API by name, the SigV4-signed calls, and what the routers and workloads commands build on them.
|
Package fleet is the CLI's client of the manager's IAM-authorized API: the lookup of the API by name, the SigV4-signed calls, and what the routers and workloads commands build on them. |
|
gcp
Package gcp is the CLI's Google Cloud client: REST over net/http with the tokens of gcloud (no Google client library), Google's error JSON as *Error, and the waiting of long-running and Compute Engine operations.
|
Package gcp is the CLI's Google Cloud client: REST over net/http with the tokens of gcloud (no Google client library), Google's error JSON as *Error, and the waiting of long-running and Compute Engine operations. |
|
gcp/access
Package access is the manifest of what Dormeto needs in Google Cloud: the APIs, the custom roles, the predefined roles' permissions, the router's grants and, per `dormeto gcp` command, the permissions the operator needs by step.
|
Package access is the manifest of what Dormeto needs in Google Cloud: the APIs, the custom roles, the predefined roles' permissions, the router's grants and, per `dormeto gcp` command, the permissions the operator needs by step. |
|
gcp/gcptest
Package gcptest is a fake Google Cloud for tests: an httptest.Server and an http.Client whose transport sends every request for a *.googleapis.com, *.pkg.dev or *.run.app host to it, so production code keeps its real URLs.
|
Package gcptest is a fake Google Cloud for tests: an httptest.Server and an http.Client whose transport sends every request for a *.googleapis.com, *.pkg.dev or *.run.app host to it, so production code keeps its real URLs. |
|
gcponboard
Package gcponboard is the logic of the CLI's Google Cloud onboarding.
|
Package gcponboard is the logic of the CLI's Google Cloud onboarding. |
|
install
Package install is `dormeto aws install`: the manager installed in an AWS account (or an organization) by CodeBuild, from the CLI.
|
Package install is `dormeto aws install`: the manager installed in an AWS account (or an organization) by CodeBuild, from the CLI. |
|
install/build
Package build holds what CodeBuild runs for the install: a one-line buildspec and two POSIX shell scripts, kept in the binary and uploaded to the install's bucket (Terraform with the manager release; the organization's access).
|
Package build holds what CodeBuild runs for the install: a one-line buildspec and two POSIX shell scripts, kept in the binary and uploaded to the install's bucket (Terraform with the manager release; the organization's access). |
|
installaws
Package installaws builds the AWS SDK for Go v2 clients of the install's ports (install.Clients) and the configuration of an assumed role.
|
Package installaws builds the AWS SDK for Go v2 clients of the install's ports (install.Clients) and the configuration of an assumed role. |
|
kubernetes
Kubernetes workloads in discovery: the EKS clusters of an account and region, and a target group traced to the one Deployment or StatefulSet behind it.
|
Kubernetes workloads in discovery: the EKS clusters of an account and region, and a target group traced to the one Deployment or StatefulSet behind it. |
|
kubernetes/kubernetestest
Package kubernetestest holds the fakes of the Kubernetes ports for tests: the recorded answers of the shared cases, as the ports of internal/kubernetes.
|
Package kubernetestest holds the fakes of the Kubernetes ports for tests: the recorded answers of the shared cases, as the ports of internal/kubernetes. |
|
limit
Package limit runs a function over items a few at a time.
|
Package limit runs a function over items a few at a time. |
|
metrics
Package metrics is phase 2 of the estimate (vision docs/specs/2026-10-10-savings-estimate-design.md §5): each eligible workload's requests per minute over 14 days, and the measured uptime of EC2 instances, ECS services and companion databases, read from CloudWatch.
|
Package metrics is phase 2 of the estimate (vision docs/specs/2026-10-10-savings-estimate-design.md §5): each eligible workload's requests per minute over 14 days, and the measured uptime of EC2 instances, ECS services and companion databases, read from CloudWatch. |
|
options
Package options parses the estimate command's options, ported from the Node estimate (manager packages/estimate/src/options.ts): the same options, values, defaults, checks and messages, in the same order of checks, so a bad input gives the same first message.
|
Package options parses the estimate command's options, ported from the Node estimate (manager packages/estimate/src/options.ts): the same options, values, defaults, checks and messages, in the same order of checks, so a bad input gives the same first message. |
|
parity
Package parity replays the shared test cases the manager's Node export writes into testdata/parity, and compares Go results with the Node ones.
|
Package parity replays the shared test cases the manager's Node export writes into testdata/parity, and compares Go results with the Node ones. |
|
prices
The price book: AWS's on-demand list prices of what a nap stops, from the Price List API, cached per region and item, and Spot prices and discounts.
|
The price book: AWS's on-demand list prices of what a nap stops, from the Price List API, cached per region and item, and Spot prices and discounts. |
|
progress
Package progress is the estimate's progress lines, ported from the Node estimate's packages/estimate/src/progress.ts: discovery and phase 2's CloudWatch reads (requests, uptime).
|
Package progress is the estimate's progress lines, ported from the Node estimate's packages/estimate/src/progress.ts: discovery and phase 2's CloudWatch reads (requests, uptime). |
|
replay
The idle window advice.
|
The idle window advice. |
|
report
Text as the Node report writes it (manager packages/estimate/src/report.ts): dollars as Intl writes them, JavaScript's Math.round, String.length in UTF-16 units, and the small helpers n, day, windowAdjective and windowWords.
|
Text as the Node report writes it (manager packages/estimate/src/report.ts): dollars as Intl writes them, JavaScript's Math.round, String.length in UTF-16 units, and the small helpers n, day, windowAdjective and windowWords. |
|
stopped
Package stopped describes what a nap of each backend stops.
|
Package stopped describes what a nap of each backend stops. |
