Billing Account Auditor
Mindset
One-line takeaway: the verdict is the worst finding across five
dimensions, and two are in a class of their own — root access keys (bypass
MFA for unlimited billing API access) and the IAM-billing-access master
switch (overrides every IAM policy if deactivated).
Billing is the financial root of trust for an AWS account. The root user has
unlimited billing power by definition — view, modify, close the account.
Unlike KMS or S3 where the damage radius is one key or bucket, a billing
compromise can:
- Close the entire account (
aws-portal:ModifyAccount — terminates all
resources across every region and service).
- Delete payment methods and trigger service suspension.
- Modify tax invoices, Cost Explorer settings, and Savings Plans.
Three principles drive the classification:
- Billing access must be delegated to IAM principals — not concentrated
on root. Root should never be used for day-to-day billing operations.
- Root must be locked down — MFA enabled, zero access keys. A root
access key is a permanent, MFA-bypassing billing backdoor.
- Automated cost controls must be active — Cost Anomaly Detection for
ML-based spike detection, budgets for threshold guardrails. Without them,
a single misconfiguration (e.g., an over-provisioned RDS instance or a
compromised credential spinning EC2) can accumulate thousands of dollars
before anyone notices.
Quick reference — severity thresholds
| Condition |
Verdict |
Risk |
Step |
Root access keys present (AccountAccessKeysPresent: 1) |
ROOT_BILLING |
CRITICAL |
Step 1 |
Root MFA not enabled (AccountMFAEnabled: 0) |
ROOT_BILLING |
CRITICAL |
Step 1 |
| IAM billing access DEACTIVATED (master switch off) |
ROOT_BILLING |
HIGH |
Step 2 |
| IAM billing access ACTIVATED but no IAM principal has billing actions |
ROOT_BILLING |
MEDIUM |
Step 2 |
| No Cost Anomaly Detection monitors |
NO_ANOMALY_DETECTION |
MEDIUM |
Step 3 |
| CAD monitors exist but no alert subscriptions |
NO_ANOMALY_DETECTION |
LOW |
Step 3 |
| No billing budgets configured |
CONFIG_GAP |
LOW |
Step 4 |
| Budgets exist but no alert notifications |
CONFIG_GAP |
LOW |
Step 4 |
| Free-tier usage alerts not enabled |
CONFIG_GAP |
LOW |
Step 5 |
| All dimensions properly configured |
OK |
LOW |
Step 6 |
The verdict is the maximum-severity finding: ROOT_BILLING >
NO_ANOMALY_DETECTION > CONFIG_GAP > OK.
Pre-flight: account context gate (run before classification)
Several account attributes change the audit scope. Misclassifying them
produces false positives.
| Attribute |
Value |
Effect on audit |
| Account type |
Organization member (linked account) |
Billing is managed by the payer (management) account. The member account's own billing-access setting and IAM billing policies are secondary — the payer controls consolidated billing. Still audit root MFA and CAD for the member account. Skip billing-access model and budgets if the payer handles them. Note this in the output. |
| Account type |
Payer (management) account |
Full audit applies. This is the account that receives the invoice. |
| Account type |
Standalone |
Full audit applies. |
| Cost Explorer |
Not yet enabled |
ce:* actions fail until an account admin enables Cost Explorer in the console (one-way operation). If CE is not enabled, CAD cannot be configured either — both are CONFIG_GAP at minimum. Flag the CE-not-enabled state explicitly. |
| Region |
GovCloud (us-gov-*) |
Billing APIs behave identically, but some console features differ. No change to classification. |
If the input is incomplete (missing root MFA status, missing billing
access setting), output:
ACCOUNT: <account-id>
VERDICT: ERROR
REASON: Billing configuration snapshot is incomplete — <missing field>.
Cannot classify safely.
REMEDIATION: Collect the missing data and re-audit. See the data-collection
commands in Pre-flight.
Live-account data-collection commands moved verbatim to references/diagnostic-commands.md.
Load on demand when auditing a live account.
Process — Classification logic (apply in order, aggregate worst)
Step 0: Expert knowledge — non-obvious AWS Billing behaviors
Step 0 expert-knowledge deep dive (billing namespace vs AdministratorAccess, master switch, root keys bypass MFA, aws-portal console-only, CE one-way enablement, CAD vs Budgets, budget quota, free-tier alert routing, root MFA APIs, consolidated billing, CE region pinning, cumulative thresholds) moved verbatim to references/advanced-patterns.md.
Load on demand when a verdict hinges on a non-obvious billing behavior.
Step 1: Root account security (highest priority — unlimited billing power)
Root has irrevocable billing authority. An unprotected root is the
highest-severity billing risk because it can close the account, delete
payment methods, and disable all cost controls in seconds.
Check AccountAccessKeysPresent and AccountMFAEnabled from
aws iam get-account-summary:
Root access keys present (AccountAccessKeysPresent: 1) →
ROOT_BILLING (CRITICAL). This is the single most dangerous billing
configuration. The key bypasses MFA for every billing API call. Delete
it immediately — there is no legitimate use case for root access keys.
Anyone with the key can close the account programmatically.
Root MFA not enabled (AccountMFAEnabled: 0) → ROOT_BILLING
(CRITICAL). The root account has unlimited billing power and is
protected by only a password. If the password is compromised (phishing,
credential stuffing), the attacker has full billing control. Enable
a hardware or virtual MFA on root immediately.
Both findings can be present simultaneously. Each independently drives
the verdict to ROOT_BILLING with CRITICAL risk.
If root access keys are present AND root MFA is disabled, the account
is in its most vulnerable billing posture — the access key bypasses the
absent MFA entirely, making the MFA gap irrelevant for programmatic
attacks. Treat as CRITICAL and remediate both findings.
Step 2: Billing access model — IAM delegation vs root-only
Check whether billing operations require root or are delegated to IAM
principles. This step has two sub-checks:
Sub-check 2a: Account-level master switch. The "IAM User and Role
Access to Billing Information" setting (Billing console → Account) controls
whether ANY IAM principal can access billing. This is NOT an IAM policy —
it is a master switch that OVERRIDES all IAM policies.
DEACTIVATED → ROOT_BILLING (HIGH). Only root can access billing
console and APIs. Every billing operation — viewing invoices, creating
budgets, checking Cost Explorer — requires root login. This forces root
usage for routine FinOps work, violating least-privilege and increasing
root-credential exposure. Activate this setting to enable IAM delegation.
ACTIVATED → Proceed to sub-check 2b.
Sub-check 2b: IAM billing principals exist. Even with the master
switch ON, an account is effectively root-only if no IAM user, group, or
role has any billing actions in their policies. The master switch enables
the CAPABILITY; IAM policies grant the actual ACCESS.
No IAM principal has any billing actions (aws-portal:*, ce:*,
cur:*, budgets:*, savingsplans:*, pricing:*, tax:*,
invoicing:*, payments:*) → ROOT_BILLING (MEDIUM). The capability
is on but nobody was granted access. Billing operations still require
root. Create an IAM group with aws-portal:ViewBilling + ce:* +
budgets:* and assign FinOps team members.
One or more IAM principals have billing actions → Check least-
privilege scope. aws-portal:* on Resource: "*" is acceptable for a
billing-admin role but should be scoped to a named group, not individual
users. Flag wildcard aws-portal:ModifyBilling on non-admin principals
as a MEDIUM finding (does not change verdict). Proceed to Step 3.
Step 3: Cost Anomaly Detection (automated cost-spike detection)
Check for Cost Anomaly Detection monitors via
aws ce list-cost-anomaly-monitors --region us-east-1:
Zero monitors → NO_ANOMALY_DETECTION (MEDIUM). No ML-based cost
spike detection. A misconfigured service, compromised credential, or
unexpected data-transfer surge accumulates charges undetected. CAD is
free (included with Cost Explorer) — there is no cost reason to skip it.
Monitors exist but zero alert subscriptions →
NO_ANOMALY_DETECTION (LOW). CAD detects anomalies but nobody
receives notifications. The anomalies are visible in the console but
no email/SNS is sent. Add an anomaly subscription to close the gap.
Monitors + subscriptions exist → OK for this dimension. Verify the
subscription threshold is reasonable (default is $100; adjust to the
account's spend profile). A $10,000/month account with a $100 threshold
generates noise; a $500/month account with a $100 threshold is appropriate.
If Cost Explorer is not enabled, CAD is also unavailable. This is
NO_ANOMALY_DETECTION (MEDIUM) — note the root cause (CE not enabled)
in the finding text.
Step 4: Billing budgets and alerts (threshold guardrails)
Check budgets via aws budgets describe-budgets --account-id <acct>:
Zero budgets → CONFIG_GAP (LOW). No spend guardrails. Without a
budget, there is no automated notification when spend exceeds a planned
amount. At minimum, create one total-cost budget at the account's monthly
spend with alerts at 50%, 80%, and 100%.
Budgets exist but no notifications → CONFIG_GAP (LOW). Budgets
without alert notifications are passive — they track spend but do not
alert. Verify each budget has at least one notification.
Budgets + notifications exist → OK for this dimension.
Step 5: Free-tier usage alerts (surprise-charge prevention)
Check the "Receive Free Tier Usage Alerts" preference (Billing console →
Billing preferences):
Free-tier alerts not enabled → CONFIG_GAP (LOW). Free-tier-
eligible services can exceed limits silently, generating charges on an
account expected to stay within free tier. Enable this preference to
receive email alerts when free-tier usage approaches 85%.
Free-tier alerts enabled → OK for this dimension.
Alternate billing contact: verify a billing alternate contact email is
set (aws account get-contact-information). If not set, free-tier alerts
default to root email only. This does not change the verdict but should be
noted as an operational recommendation.
Step 6: Aggregation — worst finding wins
verdict = max(root_security, billing_access, anomaly_detection, budgets, free_tier)
Where ROOT_BILLING > NO_ANOMALY_DETECTION > CONFIG_GAP > OK. If no findings
(all dimensions OK), the verdict is OK.
Output format (per account)
ACCOUNT: <account-id or alias>
VERDICT: ROOT_BILLING | NO_ANOMALY_DETECTION | CONFIG_GAP | OK
RISK: CRITICAL | HIGH | MEDIUM | LOW
REASON: <1-2 sentences citing the worst finding and its step>
FINDINGS:
- [CRITICAL] <finding description (Step N)>
- [MEDIUM] <finding description (Step N)>
- [OK] <dimension that passed>
REMEDIATION: <specific action per finding, or "None required" if OK>
Worked example — root access keys + no CAD
ACCOUNT: 111111111111
VERDICT: ROOT_BILLING
RISK: CRITICAL
REASON: Root account has active access keys (AccountAccessKeysPresent: 1) —
a permanent MFA-bypassing billing backdoor (Step 1). Cost Anomaly Detection
is also not enabled, compounding the exposure.
FINDINGS:
- [CRITICAL] Root access keys present — API access to all billing actions
without MFA (Step 1)
- [MEDIUM] No Cost Anomaly Detection monitors — cost spikes undetected
(Step 3)
- [LOW] No billing budgets configured (Step 4)
- [OK] Root MFA is enabled (Step 1)
- [OK] IAM billing access is ACTIVATED with delegated principals (Step 2)
REMEDIATION:
1. CRITICAL — Delete root access keys immediately:
aws iam delete-access-key --access-key-id <AKIA...> (run as root in
console; this is the only way to manage root keys).
2. MEDIUM — Create a Cost Anomaly Detection monitor:
aws ce create-anomaly-monitor --monitor-name "AllServices" \
--monitor-type DIMENSIONAL --region us-east-1
Then create a subscription:
aws ce create-anomaly-subscription --subscription-name "FinOpsAlert" \
--monitor-arn <arn> --threshold 100.0 \
--frequency IMMEDIATE --region us-east-1.
3. Create a total-cost budget with 80% and 100% alerts.
Anti-Patterns — NEVER
NEVER assume AdministratorAccess grants billing access. Billing actions
(aws-portal:*, ce:*, cur:*, budgets:*) are in a separate
namespace that must be explicitly granted. An admin user who cannot see
the billing console is NOT a misconfiguration — it is the default
behavior when the master switch is off or billing policies are absent.
NEVER classify an account with root access keys as anything other than
ROOT_BILLING. Root access keys bypass MFA for every billing API call
— they are a permanent, MFA-bypassing billing backdoor. Even if every
other dimension is perfectly configured, a root access key is CRITICAL.
NEVER treat AccountMFAEnabled: 0 as a minor finding. The root account
has unlimited billing power including account closure. Without MFA,
a compromised root password gives an attacker full financial control.
This is always CRITICAL and always ROOT_BILLING.
NEVER use aws iam list-mfa-devices to check root MFA. That API lists
IAM-user MFA devices only — the root user does not appear in the
results. Use aws iam get-account-summary → AccountMFAEnabled, or
parse the credential report's root-user mfa_active column. Using the
wrong API silently produces a false negative.
NEVER assume the IAM billing-access master switch is an IAM policy. It
is an account-level setting (Billing console → Account) that OVERRIDES
all IAM policies. If DEACTIVATED, even a user with explicit
aws-portal:ViewBilling cannot access billing. Checking IAM policies
alone misses this gate.
NEVER recommend disabling the IAM billing-access master switch as a
security hardening step. While it concentrates billing access on root,
it also prevents legitimate IAM-based FinOps workflows (budgets, Cost
Explorer dashboards, automated cost alerts via Lambda). The correct
hardening is to ACTIVATE the switch and delegate billing access via
least-privilege IAM group policies.
NEVER confuse Cost Anomaly Detection with Budgets. CAD uses ML to
detect unexpected spending anomalies (dynamic baselines). Budgets are
static threshold alerts. Both serve different purposes and both should
be configured. Recommending budgets as a replacement for CAD misses
the class of problems CAD catches (novel spend patterns, sudden
data-transfer surges, compromised credentials spinning resources).
NEVER recommend creating per-service budgets for every AWS service.
Budgets have a 100-per-account quota (soft limit). A large account
with 50+ services hits this fast. Prefer one total-cost budget plus
per-business-unit or per-member-account budgets.
NEVER assume a budget without notifications provides alerting. Budgets
are passive trackers unless notification rules are attached. Always
verify aws budgets describe-notifications-for-budget returns at least
one entry per budget.
NEVER skip the consolidated-billing context for Organization member
accounts. A member account's billing is managed by the payer — the
member's own billing-access setting may be irrelevant. Still audit
root MFA, CAD, and local budgets for the member account, but note
that payment methods and invoicing are payer-controlled.
NEVER treat aws-portal:ModifyBilling on an IAM principal as a
security finding by itself. Billing-admin roles legitimately need
modify access to manage budgets, Savings Plans, and tax settings.
Flag it only if attached to a principal that should be read-only
(e.g., a developer role). The finding is about the PRINCIPAL, not
the action.
Pre-flight safety checks (run before any remediation CLI)
- MANDATORY CONFIRMATION GATE. Before any state-changing billing
operation (deleting root access keys, activating/deactivating the
billing-access master switch, creating/deleting budgets, modifying
CAD monitors), the auditor MUST emit:
CONFIRM: About to <action> on account <acct>. This affects <consequence>. Proceed? (yes/no)
- Root access key deletion is irreversible and root-only. Root keys
can only be managed by signing in as root in the console — IAM users
(even admins) cannot delete root keys via CLI. The auditor cannot
automate this; it must surface as a human-action remediation step.
- The billing-access master switch change is instantaneous. Activating
or deactivating it takes effect immediately across all IAM principals.
Deactivating it revokes billing access for all IAM users — verify no
automated billing workflows (Lambda, Cost Explorer dashboards) depend
on IAM billing access before toggling.
- Budget creation does not modify spend. Creating a budget is a
read-only observability action — it tracks spend without enforcing
limits. Budgets do NOT cap or block spending. Be explicit about this
in the remediation; a common misconception is that a budget prevents
overage.
- CAD monitor creation is free. Cost Anomaly Detection is included
with Cost Explorer at no additional cost. There is no cost concern
with creating monitors and subscriptions.
- Verify Cost Explorer is enabled before creating CAD monitors. CAD
is a CE sub-service. If CE is not enabled,
create-anomaly-monitor
fails. Enable CE in the console first (one-way operation).
Remediation guidance
For ROOT_BILLING — root access keys present (Step 1, CRITICAL)
- Immediately sign in to the console as root and delete the access
key. This is the ONLY way to manage root keys — IAM admins cannot.
- Audit CloudTrail for API calls from the root access key during the
exposure window. Any billing API call (
aws-portal:*, budgets:*,
ce:*) from the key may indicate unauthorized access.
- If the key was used to modify billing (changed payment methods,
enabled/disabled budgets), review the change and revert if malicious.
- Enable root MFA if not already enabled.
For ROOT_BILLING — root MFA not enabled (Step 1, CRITICAL)
- Sign in as root and enable a virtual or hardware MFA device.
- Verify by checking
aws iam get-account-summary shows
AccountMFAEnabled: 1.
- Ensure the root password is strong and not shared.
For ROOT_BILLING — IAM billing access DEACTIVATED (Step 2, HIGH)
- Activate "IAM User and Role Access to Billing Information" in the
Billing console (Account → scroll to IAM User and Role Access →
Edit → Activate). This takes effect immediately.
- Create an IAM group
BillingViewers with a managed policy granting
aws-portal:ViewBilling, aws-portal:ViewUsage, ce:GetCostAndUsage,
ce:GetDimensions, ce:GetTags, budgets:ViewBudget.
- Create an IAM group
BillingAdmins adding aws-portal:ModifyBilling,
budgets:ModifyBudget, savingsplans:* to the viewers policy.
- Assign FinOps team members to the appropriate group.
For NO_ANOMALY_DETECTION — CAD not enabled (Step 3, MEDIUM)
- Ensure Cost Explorer is enabled (Billing → Cost Explorer → Launch).
This is a one-way operation; it cannot be disabled once enabled.
- Create the default monitor:
aws ce create-anomaly-monitor --monitor-name "AllServicesMonitor" \
--monitor-type DIMENSIONAL \
--monitor-specification '{"Dimension":"SERVICE","MatchOptions":["EQUALS"],"Values":[]}' \
--profile <p> --region us-east-1
An empty Values array means "monitor all services."
- Create an alert subscription:
aws ce create-anomaly-subscription \
--subscription-name "FinOpsAnomalyAlert" \
--account-id <acct> \
--monitor-arn <monitor-arn> \
--threshold 100.0 \
--frequency IMMEDIATE \
--subscription-status ACTIVE \
--notification-email-list finops@example.com \
--profile <p> --region us-east-1
Adjust $100 threshold to the account's spend profile.
For CONFIG_GAP — no budgets (Step 4, LOW)
- Create a total-cost budget:
aws budgets create-budget --account-id <acct> \
--budget '{
"BudgetName":"MonthlyCostBudget",
"BudgetLimit":{"Amount":"5000","Unit":"USD"},
"TimeUnit":"MONTHLY",
"BudgetType":"COST"
}' \
--notifications-with-subscribers '[
{"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},
"Subscribers":[{"SubscriptionType":"EMAIL","Address":"finops@example.com"}]}
]' \
--profile <p>
- Adjust the budget limit to match the account's monthly spend.
For CONFIG_GAP — free-tier alerts not enabled (Step 5, LOW)
- Enable in the Billing console: Billing preferences → Receive Free Tier
Usage Alerts → Edit → check the box → Save.
- Verify a billing alternate contact email is set so alerts reach the
right team:
aws account put-alternate-contact --alternate-contact-type BILLING \
--email-address "finops@example.com" --name "FinOps Team" \
--phone-number "+1-555-0100" --title "Billing" \
--profile <p>
For OK
- No remediation required for the current posture.
- Recommend periodic review of budget thresholds as spend patterns change.
- Recommend reviewing CAD anomaly reports weekly to tune thresholds.
Recent AWS features (2024-2026)
Recent AWS features 2024-2026 (Billing Conductor, FOCUS-aligned billing, CAD improvements) moved verbatim to references/advanced-patterns.md.
Load on demand when checking recent billing-surface changes.
References (load on demand)
- references/advanced-patterns.md — Step 0 non-obvious AWS Billing behaviors (billing namespace, master switch, root keys, CE enablement, CAD vs Budgets, quotas, consolidated billing) and Recent AWS features moved from SKILL.md.
- references/diagnostic-commands.md — live-account data-collection commands (root MFA, billing access, CAD monitors/subscriptions, budgets, free-tier alerts) moved from SKILL.md.
Domain
AWS CloudOps / FinOps Billing Governance & Account Security.
AWS documentation
1---2name: billing-account-auditor3description: Audits AWS account billing posture across five dimensions — root account security (MFA + access keys), IAM user/group billing access delegation vs root-only, AWS Cost Anomaly Detection enablement, billing budgets/alerts coverage, and free-tier usage alerts. Emits a deterministic verdict (ROOT_BILLING | NO_ANOMALY_DETECTION | CONFIG_GAP | OK) per account with enumerated findings and specific CLI remediation. Use when reviewing billing access, checking cost anomaly detection, auditing budget coverage, validating root MFA, or hardening billing posture for FinOps compliance.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline configuration classification. Live-account audits use aws iam get-account-summary, aws ce list-cost-anomaly-monitors, aws budgets describe-budgets, and aws ce get-anomaly-subscriptions (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/billing-account-auditor8 domain: aws-cloudops9 complexity: medium10 requires_llm: 'true'11 phase: '2'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: FinOps15 verdict_shape: ROOT_BILLING | NO_ANOMALY_DETECTION | CONFIG_GAP | OK16 when_to_use: Reviewing billing access delegation, checking if Cost Anomaly Detection is enabled, auditing budget/alert coverage, validating root MFA, or hardening billing posture before a FinOps compliance review.17 activation_triggers: audit my billing configuration, check billing access, is Cost Anomaly Detection enabled, do I have billing budgets, is root MFA enabled, billing alerts configured, free tier usage alerts, who can access billing, root account billing access, billing posture audit18 invocation_schema: 'Input: either (a) an account billing configuration snapshot (root MFA status, IAM billing access setting, IAM billing policies, CAD monitors, budgets, free-tier alert preference), OR (b) an account-id for live-account audit. Output: deterministic ACCOUNT/VERDICT/RISK/REASON/ FINDINGS/REMEDIATION block, where VERDICT is ROOT_BILLING, NO_ANOMALY_DETECTION, CONFIG_GAP, or OK.'19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 keywords: AWS Billing, billing access, root MFA, Cost Anomaly Detection, billing budgets, free-tier alerts, aws-portal, Cost Explorer, FinOps, billing audit, cost governance, IAM billing delegation, account security, budget alerts, billing preferences22 tags: billing, finops, cost-management, security, root-mfa, anomaly-detection, audit23---2425# Billing Account Auditor2627## Mindset2829**One-line takeaway:** the verdict is the **worst** finding across five30dimensions, and two are in a class of their own — root access keys (bypass31MFA for unlimited billing API access) and the IAM-billing-access master32switch (overrides every IAM policy if deactivated).3334Billing is the financial root of trust for an AWS account. The root user has35unlimited billing power by definition — view, modify, close the account.36Unlike KMS or S3 where the damage radius is one key or bucket, a billing37compromise can:38- **Close the entire account** (`aws-portal:ModifyAccount` — terminates all39 resources across every region and service).40- **Delete payment methods** and trigger service suspension.41- **Modify tax invoices**, Cost Explorer settings, and Savings Plans.4243Three principles drive the classification:44- **Billing access must be delegated to IAM principals** — not concentrated45 on root. Root should never be used for day-to-day billing operations.46- **Root must be locked down** — MFA enabled, zero access keys. A root47 access key is a permanent, MFA-bypassing billing backdoor.48- **Automated cost controls must be active** — Cost Anomaly Detection for49 ML-based spike detection, budgets for threshold guardrails. Without them,50 a single misconfiguration (e.g., an over-provisioned RDS instance or a51 compromised credential spinning EC2) can accumulate thousands of dollars52 before anyone notices.5354## Quick reference — severity thresholds5556| Condition | Verdict | Risk | Step |57|---|---|---|---|58| Root access keys present (`AccountAccessKeysPresent: 1`) | **ROOT_BILLING** | CRITICAL | Step 1 |59| Root MFA not enabled (`AccountMFAEnabled: 0`) | **ROOT_BILLING** | CRITICAL | Step 1 |60| IAM billing access DEACTIVATED (master switch off) | **ROOT_BILLING** | HIGH | Step 2 |61| IAM billing access ACTIVATED but no IAM principal has billing actions | **ROOT_BILLING** | MEDIUM | Step 2 |62| No Cost Anomaly Detection monitors | **NO_ANOMALY_DETECTION** | MEDIUM | Step 3 |63| CAD monitors exist but no alert subscriptions | **NO_ANOMALY_DETECTION** | LOW | Step 3 |64| No billing budgets configured | **CONFIG_GAP** | LOW | Step 4 |65| Budgets exist but no alert notifications | **CONFIG_GAP** | LOW | Step 4 |66| Free-tier usage alerts not enabled | **CONFIG_GAP** | LOW | Step 5 |67| All dimensions properly configured | **OK** | LOW | Step 6 |6869The verdict is the **maximum-severity** finding: ROOT_BILLING >70NO_ANOMALY_DETECTION > CONFIG_GAP > OK.7172## Pre-flight: account context gate (run before classification)7374Several account attributes change the audit scope. Misclassifying them75produces false positives.7677| Attribute | Value | Effect on audit |78|---|---|---|79| Account type | **Organization member** (linked account) | Billing is managed by the **payer (management) account**. The member account's own billing-access setting and IAM billing policies are secondary — the payer controls consolidated billing. Still audit root MFA and CAD for the member account. Skip billing-access model and budgets if the payer handles them. Note this in the output. |80| Account type | **Payer (management) account** | Full audit applies. This is the account that receives the invoice. |81| Account type | **Standalone** | Full audit applies. |82| Cost Explorer | Not yet enabled | `ce:*` actions fail until an account admin enables Cost Explorer in the console (one-way operation). If CE is not enabled, CAD cannot be configured either — both are CONFIG_GAP at minimum. Flag the CE-not-enabled state explicitly. |83| Region | GovCloud (us-gov-*) | Billing APIs behave identically, but some console features differ. No change to classification. |8485**If the input is incomplete** (missing root MFA status, missing billing86access setting), output:8788```text89ACCOUNT: <account-id>90VERDICT: ERROR91REASON: Billing configuration snapshot is incomplete — <missing field>.92Cannot classify safely.93REMEDIATION: Collect the missing data and re-audit. See the data-collection94commands in Pre-flight.95```9697Live-account data-collection commands moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md).98Load on demand when auditing a live account.99100## Process — Classification logic (apply in order, aggregate worst)101102### Step 0: Expert knowledge — non-obvious AWS Billing behaviors103104Step 0 expert-knowledge deep dive (billing namespace vs AdministratorAccess, master switch, root keys bypass MFA, aws-portal console-only, CE one-way enablement, CAD vs Budgets, budget quota, free-tier alert routing, root MFA APIs, consolidated billing, CE region pinning, cumulative thresholds) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).105Load on demand when a verdict hinges on a non-obvious billing behavior.106107### Step 1: Root account security (highest priority — unlimited billing power)108109Root has irrevocable billing authority. An unprotected root is the110highest-severity billing risk because it can close the account, delete111payment methods, and disable all cost controls in seconds.112113Check `AccountAccessKeysPresent` and `AccountMFAEnabled` from114`aws iam get-account-summary`:115116- **Root access keys present** (`AccountAccessKeysPresent: 1`) →117 **ROOT_BILLING (CRITICAL)**. This is the single most dangerous billing118 configuration. The key bypasses MFA for every billing API call. Delete119 it immediately — there is no legitimate use case for root access keys.120 Anyone with the key can close the account programmatically.121122- **Root MFA not enabled** (`AccountMFAEnabled: 0`) → **ROOT_BILLING123 (CRITICAL)**. The root account has unlimited billing power and is124 protected by only a password. If the password is compromised (phishing,125 credential stuffing), the attacker has full billing control. Enable126 a hardware or virtual MFA on root immediately.127128Both findings can be present simultaneously. Each independently drives129the verdict to ROOT_BILLING with CRITICAL risk.130131**If root access keys are present AND root MFA is disabled**, the account132is in its most vulnerable billing posture — the access key bypasses the133absent MFA entirely, making the MFA gap irrelevant for programmatic134attacks. Treat as CRITICAL and remediate both findings.135136### Step 2: Billing access model — IAM delegation vs root-only137138Check whether billing operations require root or are delegated to IAM139principles. This step has two sub-checks:140141**Sub-check 2a: Account-level master switch.** The "IAM User and Role142Access to Billing Information" setting (Billing console → Account) controls143whether ANY IAM principal can access billing. This is NOT an IAM policy —144it is a master switch that OVERRIDES all IAM policies.145146- **DEACTIVATED** → **ROOT_BILLING (HIGH)**. Only root can access billing147 console and APIs. Every billing operation — viewing invoices, creating148 budgets, checking Cost Explorer — requires root login. This forces root149 usage for routine FinOps work, violating least-privilege and increasing150 root-credential exposure. Activate this setting to enable IAM delegation.151152- **ACTIVATED** → Proceed to sub-check 2b.153154**Sub-check 2b: IAM billing principals exist.** Even with the master155switch ON, an account is effectively root-only if no IAM user, group, or156role has any billing actions in their policies. The master switch enables157the CAPABILITY; IAM policies grant the actual ACCESS.158159- **No IAM principal has any billing actions** (`aws-portal:*`, `ce:*`,160 `cur:*`, `budgets:*`, `savingsplans:*`, `pricing:*`, `tax:*`,161 `invoicing:*`, `payments:*`) → **ROOT_BILLING (MEDIUM)**. The capability162 is on but nobody was granted access. Billing operations still require163 root. Create an IAM group with `aws-portal:ViewBilling` + `ce:*` +164 `budgets:*` and assign FinOps team members.165166- **One or more IAM principals have billing actions** → Check least-167 privilege scope. `aws-portal:*` on `Resource: "*"` is acceptable for a168 billing-admin role but should be scoped to a named group, not individual169 users. Flag wildcard `aws-portal:ModifyBilling` on non-admin principals170 as a MEDIUM finding (does not change verdict). Proceed to Step 3.171172### Step 3: Cost Anomaly Detection (automated cost-spike detection)173174Check for Cost Anomaly Detection monitors via175`aws ce list-cost-anomaly-monitors --region us-east-1`:176177- **Zero monitors** → **NO_ANOMALY_DETECTION (MEDIUM)**. No ML-based cost178 spike detection. A misconfigured service, compromised credential, or179 unexpected data-transfer surge accumulates charges undetected. CAD is180 free (included with Cost Explorer) — there is no cost reason to skip it.181182- **Monitors exist but zero alert subscriptions** →183 **NO_ANOMALY_DETECTION (LOW)**. CAD detects anomalies but nobody184 receives notifications. The anomalies are visible in the console but185 no email/SNS is sent. Add an anomaly subscription to close the gap.186187- **Monitors + subscriptions exist** → OK for this dimension. Verify the188 subscription threshold is reasonable (default is $100; adjust to the189 account's spend profile). A $10,000/month account with a $100 threshold190 generates noise; a $500/month account with a $100 threshold is appropriate.191192**If Cost Explorer is not enabled**, CAD is also unavailable. This is193**NO_ANOMALY_DETECTION (MEDIUM)** — note the root cause (CE not enabled)194in the finding text.195196### Step 4: Billing budgets and alerts (threshold guardrails)197198Check budgets via `aws budgets describe-budgets --account-id <acct>`:199200- **Zero budgets** → **CONFIG_GAP (LOW)**. No spend guardrails. Without a201 budget, there is no automated notification when spend exceeds a planned202 amount. At minimum, create one total-cost budget at the account's monthly203 spend with alerts at 50%, 80%, and 100%.204205- **Budgets exist but no notifications** → **CONFIG_GAP (LOW)**. Budgets206 without alert notifications are passive — they track spend but do not207 alert. Verify each budget has at least one notification.208209- **Budgets + notifications exist** → OK for this dimension.210211### Step 5: Free-tier usage alerts (surprise-charge prevention)212213Check the "Receive Free Tier Usage Alerts" preference (Billing console →214Billing preferences):215216- **Free-tier alerts not enabled** → **CONFIG_GAP (LOW)**. Free-tier-217 eligible services can exceed limits silently, generating charges on an218 account expected to stay within free tier. Enable this preference to219 receive email alerts when free-tier usage approaches 85%.220221- **Free-tier alerts enabled** → OK for this dimension.222223**Alternate billing contact:** verify a billing alternate contact email is224set (`aws account get-contact-information`). If not set, free-tier alerts225default to root email only. This does not change the verdict but should be226noted as an operational recommendation.227228### Step 6: Aggregation — worst finding wins229230```text231verdict = max(root_security, billing_access, anomaly_detection, budgets, free_tier)232```233234Where ROOT_BILLING > NO_ANOMALY_DETECTION > CONFIG_GAP > OK. If no findings235(all dimensions OK), the verdict is **OK**.236237## Output format (per account)238239```text240ACCOUNT: <account-id or alias>241VERDICT: ROOT_BILLING | NO_ANOMALY_DETECTION | CONFIG_GAP | OK242RISK: CRITICAL | HIGH | MEDIUM | LOW243REASON: <1-2 sentences citing the worst finding and its step>244FINDINGS:245 - [CRITICAL] <finding description (Step N)>246 - [MEDIUM] <finding description (Step N)>247 - [OK] <dimension that passed>248REMEDIATION: <specific action per finding, or "None required" if OK>249```250251### Worked example — root access keys + no CAD252253```text254ACCOUNT: 111111111111255VERDICT: ROOT_BILLING256RISK: CRITICAL257REASON: Root account has active access keys (AccountAccessKeysPresent: 1) —258a permanent MFA-bypassing billing backdoor (Step 1). Cost Anomaly Detection259is also not enabled, compounding the exposure.260FINDINGS:261 - [CRITICAL] Root access keys present — API access to all billing actions262 without MFA (Step 1)263 - [MEDIUM] No Cost Anomaly Detection monitors — cost spikes undetected264 (Step 3)265 - [LOW] No billing budgets configured (Step 4)266 - [OK] Root MFA is enabled (Step 1)267 - [OK] IAM billing access is ACTIVATED with delegated principals (Step 2)268REMEDIATION:269 1. CRITICAL — Delete root access keys immediately:270 aws iam delete-access-key --access-key-id <AKIA...> (run as root in271 console; this is the only way to manage root keys).272 2. MEDIUM — Create a Cost Anomaly Detection monitor:273 aws ce create-anomaly-monitor --monitor-name "AllServices" \274 --monitor-type DIMENSIONAL --region us-east-1275 Then create a subscription:276 aws ce create-anomaly-subscription --subscription-name "FinOpsAlert" \277 --monitor-arn <arn> --threshold 100.0 \278 --frequency IMMEDIATE --region us-east-1.279 3. Create a total-cost budget with 80% and 100% alerts.280```281282## Anti-Patterns — NEVER283284- NEVER assume `AdministratorAccess` grants billing access. Billing actions285 (`aws-portal:*`, `ce:*`, `cur:*`, `budgets:*`) are in a separate286 namespace that must be explicitly granted. An admin user who cannot see287 the billing console is NOT a misconfiguration — it is the default288 behavior when the master switch is off or billing policies are absent.289290- NEVER classify an account with root access keys as anything other than291 ROOT_BILLING. Root access keys bypass MFA for every billing API call292 — they are a permanent, MFA-bypassing billing backdoor. Even if every293 other dimension is perfectly configured, a root access key is CRITICAL.294295- NEVER treat `AccountMFAEnabled: 0` as a minor finding. The root account296 has unlimited billing power including account closure. Without MFA,297 a compromised root password gives an attacker full financial control.298 This is always CRITICAL and always ROOT_BILLING.299300- NEVER use `aws iam list-mfa-devices` to check root MFA. That API lists301 IAM-user MFA devices only — the root user does not appear in the302 results. Use `aws iam get-account-summary` → `AccountMFAEnabled`, or303 parse the credential report's root-user `mfa_active` column. Using the304 wrong API silently produces a false negative.305306- NEVER assume the IAM billing-access master switch is an IAM policy. It307 is an account-level setting (Billing console → Account) that OVERRIDES308 all IAM policies. If DEACTIVATED, even a user with explicit309 `aws-portal:ViewBilling` cannot access billing. Checking IAM policies310 alone misses this gate.311312- NEVER recommend disabling the IAM billing-access master switch as a313 security hardening step. While it concentrates billing access on root,314 it also prevents legitimate IAM-based FinOps workflows (budgets, Cost315 Explorer dashboards, automated cost alerts via Lambda). The correct316 hardening is to ACTIVATE the switch and delegate billing access via317 least-privilege IAM group policies.318319- NEVER confuse Cost Anomaly Detection with Budgets. CAD uses ML to320 detect unexpected spending anomalies (dynamic baselines). Budgets are321 static threshold alerts. Both serve different purposes and both should322 be configured. Recommending budgets as a replacement for CAD misses323 the class of problems CAD catches (novel spend patterns, sudden324 data-transfer surges, compromised credentials spinning resources).325326- NEVER recommend creating per-service budgets for every AWS service.327 Budgets have a 100-per-account quota (soft limit). A large account328 with 50+ services hits this fast. Prefer one total-cost budget plus329 per-business-unit or per-member-account budgets.330331- NEVER assume a budget without notifications provides alerting. Budgets332 are passive trackers unless notification rules are attached. Always333 verify `aws budgets describe-notifications-for-budget` returns at least334 one entry per budget.335336- NEVER skip the consolidated-billing context for Organization member337 accounts. A member account's billing is managed by the payer — the338 member's own billing-access setting may be irrelevant. Still audit339 root MFA, CAD, and local budgets for the member account, but note340 that payment methods and invoicing are payer-controlled.341342- NEVER treat `aws-portal:ModifyBilling` on an IAM principal as a343 security finding by itself. Billing-admin roles legitimately need344 modify access to manage budgets, Savings Plans, and tax settings.345 Flag it only if attached to a principal that should be read-only346 (e.g., a developer role). The finding is about the PRINCIPAL, not347 the action.348349## Pre-flight safety checks (run before any remediation CLI)350351- **MANDATORY CONFIRMATION GATE.** Before any state-changing billing352 operation (deleting root access keys, activating/deactivating the353 billing-access master switch, creating/deleting budgets, modifying354 CAD monitors), the auditor MUST emit:355 `CONFIRM: About to <action> on account <acct>. This affects356 <consequence>. Proceed? (yes/no)`357- **Root access key deletion is irreversible and root-only.** Root keys358 can only be managed by signing in as root in the console — IAM users359 (even admins) cannot delete root keys via CLI. The auditor cannot360 automate this; it must surface as a human-action remediation step.361- **The billing-access master switch change is instantaneous.** Activating362 or deactivating it takes effect immediately across all IAM principals.363 Deactivating it revokes billing access for all IAM users — verify no364 automated billing workflows (Lambda, Cost Explorer dashboards) depend365 on IAM billing access before toggling.366- **Budget creation does not modify spend.** Creating a budget is a367 read-only observability action — it tracks spend without enforcing368 limits. Budgets do NOT cap or block spending. Be explicit about this369 in the remediation; a common misconception is that a budget prevents370 overage.371- **CAD monitor creation is free.** Cost Anomaly Detection is included372 with Cost Explorer at no additional cost. There is no cost concern373 with creating monitors and subscriptions.374- **Verify Cost Explorer is enabled before creating CAD monitors.** CAD375 is a CE sub-service. If CE is not enabled, `create-anomaly-monitor`376 fails. Enable CE in the console first (one-way operation).377378## Remediation guidance379380### For ROOT_BILLING — root access keys present (Step 1, CRITICAL)3813821. **Immediately** sign in to the console as root and delete the access383 key. This is the ONLY way to manage root keys — IAM admins cannot.3842. Audit CloudTrail for API calls from the root access key during the385 exposure window. Any billing API call (`aws-portal:*`, `budgets:*`,386 `ce:*`) from the key may indicate unauthorized access.3873. If the key was used to modify billing (changed payment methods,388 enabled/disabled budgets), review the change and revert if malicious.3894. Enable root MFA if not already enabled.390391### For ROOT_BILLING — root MFA not enabled (Step 1, CRITICAL)3923931. Sign in as root and enable a virtual or hardware MFA device.3942. Verify by checking `aws iam get-account-summary` shows395 `AccountMFAEnabled: 1`.3963. Ensure the root password is strong and not shared.397398### For ROOT_BILLING — IAM billing access DEACTIVATED (Step 2, HIGH)3994001. Activate "IAM User and Role Access to Billing Information" in the401 Billing console (Account → scroll to IAM User and Role Access →402 Edit → Activate). This takes effect immediately.4032. Create an IAM group `BillingViewers` with a managed policy granting404 `aws-portal:ViewBilling`, `aws-portal:ViewUsage`, `ce:GetCostAndUsage`,405 `ce:GetDimensions`, `ce:GetTags`, `budgets:ViewBudget`.4063. Create an IAM group `BillingAdmins` adding `aws-portal:ModifyBilling`,407 `budgets:ModifyBudget`, `savingsplans:*` to the viewers policy.4084. Assign FinOps team members to the appropriate group.409410### For NO_ANOMALY_DETECTION — CAD not enabled (Step 3, MEDIUM)4114121. Ensure Cost Explorer is enabled (Billing → Cost Explorer → Launch).413 This is a one-way operation; it cannot be disabled once enabled.4142. Create the default monitor:415 ```bash416 aws ce create-anomaly-monitor --monitor-name "AllServicesMonitor" \417 --monitor-type DIMENSIONAL \418 --monitor-specification '{"Dimension":"SERVICE","MatchOptions":["EQUALS"],"Values":[]}' \419 --profile <p> --region us-east-1420 ```421 An empty `Values` array means "monitor all services."4223. Create an alert subscription:423 ```bash424 aws ce create-anomaly-subscription \425 --subscription-name "FinOpsAnomalyAlert" \426 --account-id <acct> \427 --monitor-arn <monitor-arn> \428 --threshold 100.0 \429 --frequency IMMEDIATE \430 --subscription-status ACTIVE \431 --notification-email-list finops@example.com \432 --profile <p> --region us-east-1433 ```434 Adjust `$100` threshold to the account's spend profile.435436### For CONFIG_GAP — no budgets (Step 4, LOW)4374381. Create a total-cost budget:439 ```bash440 aws budgets create-budget --account-id <acct> \441 --budget '{442 "BudgetName":"MonthlyCostBudget",443 "BudgetLimit":{"Amount":"5000","Unit":"USD"},444 "TimeUnit":"MONTHLY",445 "BudgetType":"COST"446 }' \447 --notifications-with-subscribers '[448 {"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},449 "Subscribers":[{"SubscriptionType":"EMAIL","Address":"finops@example.com"}]}450 ]' \451 --profile <p>452 ```4532. Adjust the budget limit to match the account's monthly spend.454455### For CONFIG_GAP — free-tier alerts not enabled (Step 5, LOW)4564571. Enable in the Billing console: Billing preferences → Receive Free Tier458 Usage Alerts → Edit → check the box → Save.4592. Verify a billing alternate contact email is set so alerts reach the460 right team:461 ```bash462 aws account put-alternate-contact --alternate-contact-type BILLING \463 --email-address "finops@example.com" --name "FinOps Team" \464 --phone-number "+1-555-0100" --title "Billing" \465 --profile <p>466 ```467468### For OK4694701. No remediation required for the current posture.4712. Recommend periodic review of budget thresholds as spend patterns change.4723. Recommend reviewing CAD anomaly reports weekly to tune thresholds.473474## Recent AWS features (2024-2026)475476Recent AWS features 2024-2026 (Billing Conductor, FOCUS-aligned billing, CAD improvements) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).477Load on demand when checking recent billing-surface changes.478479## References (load on demand)480481- [references/advanced-patterns.md](references/advanced-patterns.md) — Step 0 non-obvious AWS Billing behaviors (billing namespace, master switch, root keys, CE enablement, CAD vs Budgets, quotas, consolidated billing) and Recent AWS features moved from SKILL.md.482- [references/diagnostic-commands.md](references/diagnostic-commands.md) — live-account data-collection commands (root MFA, billing access, CAD monitors/subscriptions, budgets, free-tier alerts) moved from SKILL.md.483484## Domain485486AWS CloudOps / FinOps Billing Governance & Account Security.487488## AWS documentation489490- **Service documentation** — [AWS Billing User Guide](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html)491- **Security** — [Security in AWS Billing](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security.html)492- **API reference** — [AWS Cost Management API Reference](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/) (covers Cost Explorer, Budgets, and Cost Anomaly Detection APIs)493- **CLI reference** — [AWS Cost Explorer (`ce`) CLI](https://docs.aws.amazon.com/cli/latest/reference/ce/) · [AWS Budgets (`budgets`) CLI](https://docs.aws.amazon.com/cli/latest/reference/budgets/)494- **AWS Billing Conductor** — [Billing Conductor User Guide](https://docs.aws.amazon.com/billingconductor/latest/userguide/what-is-billingconductor.html)495- **FOCUS-aligned billing** — [Announcing FOCUS-aligned cost and usage data](https://aws.amazon.com/blogs/aws-cloud-financial-management/announcing-focus-aligned-cost-and-usage-data/)