Usage Guide
Usage Guide
Learn how to control AWS Doctor using flags and configuration profiles.
CLI Flags
| Flag | Default | Description |
|---|---|---|
--region | ~/.aws/config | Override the target AWS region. |
--profile | default | Specify which AWS profile to use. |
--waste | false | Run the waste detection engine. |
--trend | false | Generate a 6-month cost trend report. |
--output | table | Output format: table or json. |
--update | false | Self-update the tool to the latest version. |
--version | false | Display version and build information. |
Target Selection
Region Selection
If the --region flag is not provided, the tool attempts to find a region in this order:
AWS_REGIONenvironment variable.AWS_DEFAULT_REGIONenvironment variable.- The
regionfield 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 --waste --profile prod-accountMFA 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 --updateThis will check GitHub for the latest release, download the binary for your platform, and replace the existing one.