Untracked cloud spend: cost anomalies as a security signal

Unexpected cloud cost often means stolen keys running crypto mining or abandoned resources left open. How to set budgets and anomaly alerts, tag ownership, and investigate a spike.

Lesson 21 of 29 · 9 min read · practice only with authorization

Diagram

A cost spike investigation

Follow the path. One example at a time.

Step 1 of 4

Alert

An anomaly monitor fires.

Illustration: Alert
Cost Anomaly Detection: EC2 in eu-north-1  +$4,820 (expected $12)

The example on the open step is one illustration, or the fix you can paste into an application you own.

What this page is made of

3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.

  1. Unused regions

    What fails
    Attackers launch resources in regions you never use.
    Who is affected
    The bill and the account.
    What you would notice
    Spend in regions with no approved workloads.
    What you change
    Deny unused regions with organization policies.
  2. Leaked keys

    What fails
    Keys found in public repositories are used within minutes.
    Who is affected
    The account.
    What you would notice
    Large instance launches by old or CI identities.
    What you change
    Revoke keys, scan repositories, and move to keyless identity.
  3. Orphaned resources

    What fails
    Forgotten test systems keep running and stay unpatched.
    Who is affected
    The bill, and data on them.
    What you would notice
    Resources without an owner tag.
    What you change
    Require tags and clean up untagged resources.

Security services that see it too

Amazon GuardDuty raises findings such as CryptoCurrency:EC2/BitcoinTool.B and unusual API calls from a credential, often before the bill does. The GuardDuty lessons in the tool library cover triage.

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

A spike appears in a region you never use. What is the most likely cause?

Sibling techniques

Pages at the same depth, plus a lab and a glossary card for this one.

This page stands on its own. The lab and the glossary card are the next reading.

Practice

  1. LabTenant deskTwo companies, one API. See what changes when the server checks ownership.

Glossary

  1. CardUntracked cloud spendA stolen key or a public bucket often shows up first as a bill.