Anatomy of an AWS Bill Shock — LLMjacking, and the Costs You Never See

Anatomy of an AWS Bill Shock — LLMjacking, and the Costs You Never See

I recently heard about a company whose AWS account got hacked. No servers hijacked, no data stolen. The damage was the invoice: Amazon Bedrock API calls alone were burning close to ₩100 million (about $70,000) a day.

My first reaction was disbelief. Then I checked the numbers. In 2024, Sysdig estimated that abusing Claude 3 Opus across regional quota limits could exceed $100,000 per day.12 That figure was a potential upper-bound estimate based on the pricing and quotas at the time, not a measured victim invoice.

That incident prompted this write-up: how the attack actually gets in, and the account management, key management, and cost guardrails we treat as table stakes in cloud operations.

How the attack gets in: LLMjacking

Sysdig named this attack LLMjacking in May 2024.1 The mechanics are simple.

  1. A developer's access key leaks: a .env file swept into a public GitHub commit, environment variables printed in CI logs, or an infostealer on a laptop.
  2. The attacker creates no resources. They quietly verify InvokeModel permission.
  3. The stolen Bedrock access gets wired into a reverse proxy and resold as a $30-a-month "unlimited LLM" service.2
  4. Traffic from buyers worldwide flows through the victim's account, and charges climb to the quota ceiling in every enabled region.

What makes it dangerous is the silence. A cryptomining compromise spins up dozens of EC2 instances; a glance at the console gives it away. LLMjacking creates nothing. The only traces are API logs and the invoice, and most teams read the invoice a month later.

How fast does the bill reach ₩100M?

Let's check the scale. The table applies the Claude Opus 4.5 launch price snapshot from November 2025: $5 per million input tokens and $25 per million output tokens.3 At ₩1,400 to the dollar, ₩100 million is about $71,000.

Call patternToken assumptionCost per callCalls to reach ₩100M (about $71,000)
Short chat1K input · 1K output~$0.03~2.38M
Long-form generation2K input · 8K output~$0.21~340K
Large context200K input · 8K output~$1.20~60K

The table shows billing arithmetic, not time to impact. Actual timing varies widely with model-specific TPM and TPD quotas, cross-Region inference, response length, and latency, so concurrency alone cannot establish it. The important point is that token usage can create a large bill without creating any infrastructure resources.

LLMjacking attack chain from stolen credentials to the victim's bill, with short-lived credentials, SCPs, application caps, Bedrock runtime alarms, and a delayed budget backstop
The first three layers reduce exposure or alert on usage; the budget layer is a delayed financial backstop.

Account management essentials: remove the keys worth stealing

A common starting point for LLMjacking is a credential leaked from code, logs, or a developer machine. Long-lived IAM access keys give an attacker a wider window for abuse. Here is the baseline we apply to every account:

  • Root account: enable MFA, and never create root access keys. Delete them if they exist.
  • Humans: sign in through IAM Identity Center (SSO) instead of IAM users. Credentials expire with the session.
  • Workloads: obtain short-lived STS credentials through IAM roles — EC2 instance profiles, IRSA on EKS, Lambda execution roles. No key ever needs to live in code or config.
  • Audit: enable CloudTrail in all regions, and let GuardDuty flag anomalous API activity.

Nothing here is new or expensive. Yet most credential leaks happen exactly where this baseline is missing.

Bedrock key management: design for revocation, not issuance

Bedrock adds one more trap: Bedrock API keys, introduced in July 2025.4 They exist for developer convenience, and the two variants behave completely differently.

Short-term API keyLong-term API key
LifetimeConsole session, up to 12 hours1 day to no expiration
Under the hoodUses your current IAM principal's permissionsAuto-creates an IAM user bound to the key
Intended useDevelopment and testingAWS's own guidance: exploration only

A long-term key is effectively one more IAM user credential that may never expire. Wiz flagged it as "a new type of long-lived key on AWS."5 We enforce three rules:

  • Production workloads call Bedrock through IAM roles + STS, never API keys.
  • If your organization has no need for long-term keys, block their creation outright. AWS shipped IAM condition keys in September 2025 that govern key generation, expiration, and type.6
  • Turn on model invocation logging to record who calls which model and how much.7 Alongside CloudTrail, it is the first dataset you reach for in an investigation. Because invocation logging can store request and response bodies, define retention and access controls for sensitive data first.
Working on something similar?Request a technical review

Guardrails that cap the blast radius

Even if key management fails, the damage should stop at pocket change, not ₩100 million a day. This is no longer prevention; it is blast radius engineering.

  • Deny unused Regions and models with SCPs and IAM policies. This narrows attacks that exploit quota across Regions,2 and a Seoul-only organization has no reason to allow a high-cost model elsewhere.
  • Cap calls and tokens in the application. Instead of treating default Service Quotas as a configurable spending ceiling, use a model allowlist, per-principal rate limits, and a max_tokens cap.
  • Alarm on Bedrock runtime metrics. Monitor Invocations, InputTokenCount, and OutputTokenCount by model and Region, and send usage outside the normal range directly to operations.8
  • Use AWS Budgets as a delayed financial backstop. A Marketplace-filtered budget can apply IAM or SCP actions,9 but cost data commonly refreshes every 8–12 hours and can lag by a day.10 Cost Anomaly Detection can also take up to 24 hours and does not monitor AWS Marketplace charges for Anthropic Claude on Bedrock.11

For a broader method that ties these controls to release decisions and named operating owners, see the six gates from AI PoC to production.

Already compromised? The response runbook

  1. Kill the credentials first. Deactivate the leaked key and invalidate the principal's active sessions. Root-cause analysis comes second.
  2. Scope the damage with CloudTrail. Which keys, which regions, which APIs. For Bedrock, read the invocation logs alongside.
  3. Hunt for backdoors. Enumerate every IAM user, role, and access key the attacker may have planted.
  4. Contact AWS Support immediately. Report unauthorized use and unexpected charges, and submit the relevant logs and containment steps. Any billing adjustment is case-specific and not guaranteed.12
  5. Apply the sections above, in order.

The bomb isn't only hackers: costs that leak quietly

A hack stands out because it costs ₩100 million a day. The more common face of cloud cost trouble is the opposite: nobody broke in, yet money leaks every month, for years. The invisible costs:

  • NAT Gateway data processing fees on every byte that passes through
  • Cross-AZ data transfer that no architecture diagram shows
  • EBS snapshots orphaned by deleted instances, and detached Elastic IPs
  • CloudWatch Logs accumulating forever with no retention policy
  • Development and staging environments running all night

The interesting part is how the remedies overlap. Resource tagging and service-level usage and cost alarms let operations examine sudden abuse and structural waste in one control system. Cost visibility is also a security control.

The AWS invisible-cost guide continues with the cost structure and diagnostic sequence behind each item.


Design account, SCP, and cost controls with Cloud & Infrastructure, and Bedrock observability and application caps with Data & ML Engineering.

References

Sources & notes12ExpandCollapse

Footnotes

  1. Sysdig Threat Research Team, LLMjacking: Stolen Cloud Credentials Used in New AI Attack (May 2024) 2

  2. Sysdig Threat Research Team, The Growing Dangers of LLMjacking (Sep 2024) 2 3

  3. AWS, Claude Opus 4.5 now in Amazon Bedrock (Nov 2025). Launch pricing was $5 per million input tokens and $25 per million output tokens; it is not a current throughput guarantee.

  4. AWS, Amazon Bedrock introduces API keys for streamlined development (Jul 2025)

  5. Wiz, A new type of long-lived key on AWS: Bedrock API keys

  6. AWS, Three new condition keys to govern API keys for Amazon Bedrock (Sep 2025)

  7. AWS Docs, Model invocation logging — Amazon Bedrock

  8. AWS Docs, Monitoring Amazon Bedrock with CloudWatch. Invocation, input-token, and output-token metrics.

  9. AWS Docs, Configuring AWS Budgets actions. Connects budget thresholds to IAM and SCP actions.

  10. AWS Docs, Managing your costs with AWS Budgets. Budget information typically updates up to three times a day.

  11. AWS Docs, AWS Cost Anomaly Detection. Detection can take up to 24 hours, and AWS Marketplace charges for Anthropic Claude on Bedrock are excluded.

  12. AWS re:Post, What do I do if I notice unauthorized activity in my AWS account?. Account containment and AWS Support reporting steps.

Explore the delivery service behind this topic.

Cloud & Infrastructure

Put this work into practice.

An engineer reviews your environment and constraints first, then uses a 30-minute technical conversation when it helps define the execution scope.

Already trusted by teams across finance · healthcare · media · public
Request a technical review