Skip to content
Usage Guide

Usage Guide

Learn how to control AWS Doctor using subcommands, flags, and configuration profiles.

Subcommands

These are the primary workflows of the tool.

SubcommandDescription
costRun comparative cost analytics (Current month vs. Last month).
wasteRun the waste detection engine.
trendGenerate a 6-month cost trend report (optionally filtered by service).
updateSelf-update the tool to the latest version.
versionDisplay version and build information.
helpDisplay help for any subcommand.

Global Flags

These flags can be used with any subcommand (including the default cost analysis).

FlagDefaultDescription
--region~/.aws/configOverride the target AWS region.
--profiledefaultSpecify which AWS profile to use.
--outputtableOutput format: table, json, or csv.

Target Selection

Region Selection

If the --region flag is not provided, the tool attempts to find a region in this order:

  1. AWS_REGION environment variable.
  2. AWS_DEFAULT_REGION environment variable.
  3. The region field in your active profile inside ~/.aws/config.

Profile Configuration

To run audits against a specific account or role defined in your AWS config:

aws-doctor cost --profile prod-account

MFA Support

AWS Doctor has first-class support for Multi-Factor Authentication. If your profile uses assume_role with an mfa_serial, the tool will detect it and prompt you for your token code securely in the terminal.

Enter MFA code for arn:aws:iam::123456789012:mfa/user: ******
The assumed role session is managed by the tool. You don’t need to manually run aws sts get-session-token.

Automatic Updates

Keep your diagnostic engine up to date with a single command:

aws-doctor update

This will check GitHub for the latest release, download the binary for your platform, and replace the existing one.