Alert icon Keyboard navigation enabled.
Alert icon TAB or Shift+TAB to navigate across. Down ↓ to open menu. ESC to close menu.
Alert icon Down ↓ to select section. Right → to activate. Up ↑ / Down ↓ / Tab to traverse all. ESC to exit.
BeyondTrust
Skip to content Use space or enter to skip.

What can we help you find today?

Instant Results
  • Website Results
  • Technical Documentation

Filter Options

Focus your search

Filtering by

Your recent searches:

Contact Us Chat with Sales Get Support
  • English
  • Deutsch
  • français
  • español
  • 한국어
  • português
  • Home
  • Resources
  • Blog
  • The AWS Bedrock API Keys Security Guide Part 1: Risks, Vulnerabilities, and Attack Techniques current page
Link copied

The AWS Bedrock API Keys Security Guide Part 1: Risks, Vulnerabilities, and Attack Techniques

May 4, 2026

This guide documents the security risks introduced by AWS Bedrock API keys, the authentication method AWS launched in July 2025 for Amazon Bedrock. The most critical risk documented in this guide is the "phantom user" problem, detailed in the sections that follow.

Authors:
Profile
Sergio Garcia
Security Researcher
400x400 Linkedin X Profile
Phantom Labs™
BeyondTrust
API Key Security
The AWS Bedrock API Keys Security Guide Part 1: Risks, Vulnerabilities, and Attack Techniques
Profile
Sergio Garcia
Security Researcher
400x400 Linkedin X Profile
Phantom Labs™
BeyondTrust

Executive Summary

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

This guide documents the security risks introduced by AWS Bedrock API keys, the authentication method AWS launched in July 2025 for Amazon Bedrock. The most critical risk documented in this guide is the "phantom user" problem, detailed in the sections that follow.

When a long-term Bedrock API key is created through the AWS Console, AWS automatically provisions an IAM user (named BedrockAPIKey-<random-id>) and attaches the AmazonBedrockLimitedAccess managed policy without explicit user confirmation. These phantom IAM users persist indefinitely, even after the associated API key expires or is deleted, because there is no automated cleanup mechanism. Over time, they accumulate and retain administrative Bedrock permissions and reconnaissance capabilities across IAM, VPC, and KMS.

Analysis of the AmazonBedrockLimitedAccess policy reveals that the name is misleading. Despite the "limited" label, it grants destructive permissions, including the ability to delete guardrails, remove custom models, and disrupt provisioned throughput, effectively granting administrative control over the entire Bedrock service. Additionally, the policy includes cross-service permissions for IAM role enumeration, VPC network mapping, and KMS key discovery, none of which are scoped through the Bedrock API key credential itself. If an attacker creates standard IAM access keys for a phantom user, they gain full access to these permissions outside the Bedrock authentication boundary.

Criminal "LLMjacking" operations (the hijacking of cloud AI credentials for resale) have produced documented incidents including a single-burst attack costing $30,000 within three hours [1]. A single leaked Bedrock API key exposes the victim to up to $18,000 per day per region in fraudulent charges, as derived in the Cost Exposure Model section.

Organizations currently using or evaluating Bedrock API keys should audit their accounts for existing phantom users by running the open-source Bedrock Keys Security (BKS) toolkit or by executing `aws iam list-users | grep BedrockAPIKey` from the CLI. Any results indicate phantom IAM identities that warrant immediate review using the procedures in Part 2 of this guide (coming soon).


Key Findings

  • Long-term Bedrock API keys created via the AWS Console silently provision an IAM user (the "phantom user") with administrative Bedrock permissions and IAM/VPC/KMS reconnaissance capabilities.
  • These users persist indefinitely after the associated key expires or is deleted, accumulating in the account with no automated cleanup.
  • The AmazonBedrockLimitedAccess policy is misnamed: it grants destructive actions (delete guardrails, custom models, provisioned throughput) and cross-service reconnaissance well beyond Bedrock.
  • Leaked Bedrock API keys reached public repositories within two weeks of launch [6], and a single key exposes the victim to up to $18,000 per day per region in LLMjacking charges.
  • The open-source Bedrock Keys Security (BKS) toolkit covers the full lifecycle of Bedrock API key risk: discovery, incident response, forensics, cleanup, prevention, and detection content.

Background

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Standard AWS authentication uses SigV4 request signing across all services, including Amazon Bedrock. SigV4 works well for developers and infrastructure already embedded in the AWS ecosystem, but it creates friction for third-party tools, packaged software, and lightweight integrations that need to call an API with a token. Bedrock API keys address this by providing a bearer token authentication method, allowing access through an HTTP Authorization header, similar to the OpenAI or Anthropic APIs. Unlike standard AWS SigV4 authentication, where the secret is never transmitted, bearer tokens send the credential directly with every request. This simpler authentication model lowers the barrier for both integration and exploitation.

The feature comes in two variants:

  1. Short-term keys: Generated client-side from an existing session, inherits that session's permissions, last up to 12 hours, and create no additional IAM resources.
  2. Long-term keys: When created through the AWS Console, these provision a dedicated IAM user, attach the AmazonBedrockLimitedAccess managed policy, and generate a service-specific credential tied to that user. This mechanism is built on the CreateServiceSpecificCredential IAM API, originally introduced in 2016 for CodeCommit Git credentials and Amazon Keyspaces, and extended in 2025 to support Bedrock with expiration time capabilities.

This guide is the result of a BeyondTrust Phantom Labs™ investigation into the security implications of Bedrock API keys for organizations adopting Bedrock at scale.

Open-source Toolkit

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Phantom Labs maintains an open-source toolkit, Bedrock Keys Security (BKS), at github.com/BeyondTrust/bedrock-keys-security. BKS is a Python command-line tool covering the full lifecycle of Bedrock API key risk: discovery, incident response, forensics, cleanup, prevention, and detection content.

BKS capabilities include:

  • Discovery: bks scan finds all phantom IAM users and labels each as ACTIVE (live credentials), ORPHANED (no credentials, safe to remove), or AT RISK (IAM access keys present). Output in JSON or CSV.
  • Incident response: bks revoke-key contains a compromised key in one operation, blocking Bedrock access and disabling any IAM access keys on the phantom user. bks timeline reconstructs CloudTrail activity, with --all-regions for LLMjacking incidents that span multiple regions. bks report generates a full incident report.
  • Forensics: bks decode-key decodes both long-term (ABSK*) and short-term (bedrock-api-key-*) credentials offline, extracting IAM username, account ID, region, and key format.
  • Cleanup: bks cleanup deletes orphaned phantom users with --dry-run preview and confirmation prompts. ACTIVE and AT RISK users are never deleted automatically.
  • Prevention: Four ready-to-deploy Service Control Policies for AWS Organizations: Block All API Keys, Enforce 90-Day Maximum, Block Long-Term Keys Only, and Block Phantom Escalation. Available as JSON, Terraform, and CloudFormation. One was contributed to the official aws-samples repository (https://github.com/aws-samples/service-control-policy-examples/pull/23).
  • Detection content: 6 Sigma rules, 2 CloudTrail Lake queries, 2 Athena queries, 4 EventBridge patterns, and 1 CloudWatch Insights query, covering bearer token usage, key creation, phantom user creation, AKIA escalation, cross-region fan-out, and suspicious user-agents.

Each capability is referenced in its corresponding section throughout this guide.

Figure 1: Output of bks scan showing 15 phantom IAM users discovered in a single AWS account. The toolkit classifies each user as Active (credentials still in use), Orphaned (no active credentials, safe to clean up), or At Risk (IAM access keys detected, indicating potential privilege escalation). The summary identifies 10 orphaned users and flags 1 user with IAM access keys for immediate investigation.

Authentication Methods and Key Formats

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Bedrock supports three authentication methods. The following order reflects security best practices, from strongest to weakest:

1. AWS STS Temporary Credentials (Recommended): These expire automatically within one to 12 hours, create no IAM users, use standard SigV4 request signing, and produce no persistent credentials that could be leaked. This is the standard AWS security model and should be used whenever possible.

2. Short-Term Bedrock API Keys: These are acceptable when a third-party tool specifically requires HTTP bearer token authentication and cannot be configured for SigV4 signing. They are generated client-side from an existing session credential, inherit that session's Bedrock-scoped permissions, and expire automatically within 12 hours. No IAM user is created. Short-term keys always begin with the prefix bedrock-api-key- followed by a base64-encoded presigned URL. No CloudTrail event is generated at creation, only when the key is used.

Figure 2: Short-term API key authentication. The key inherits the caller's existing session permissions. No IAM user is created.

3. Long-Term Bedrock API Keys: These should be avoided unless packaged software requires static, long-lived credentials and can’t be modified. They can be configured to expire between one and 365 days, or set to never expire. When created through the AWS Console, they trigger the automatic phantom user provisioning described in the previous ‘Background’ section. When created through CLI or SDK, the IAM user must already exist. Long-term keys always begin with the prefix ABSK followed by a base64-encoded string. CloudTrail records CreateUser, AttachUserPolicy, and CreateServiceSpecificCredential events during Console-based provisioning.

Figure 3: Long-term API key provisioning through the AWS Console. Amazon Bedrock automatically creates a dedicated IAM user with the AmazonBedrockLimitedAccess policy attached.

Figure 4: CloudTrail event sequence is recorded when a long-term Bedrock API key is created through the AWS Console. The three events (CreateUser, AttachUserPolicy, and CreateServiceSpecificCredential) execute in sequence without explicit user confirmation.

AWS STS temporary credentials should be the default for Bedrock access. The cases that genuinely require API keys typically fall into three categories: legacy applications with hardcoded bearer token authentication, third-party AI platforms that can't use SigV4 signing, and vendor software requiring static credentials without STS support. If none of these apply, STS temporary credentials are the correct choice. AWS's own guidance reinforces this, recommending short-term keys for production use and long-term keys "only for exploratory purposes".

When long-term keys are unavoidable, organizations should enforce a maximum 90-day expiry and never select the "never expires" option. Monitor all usage through CloudTrail alerts on the callWithBearerToken signal, rotate keys monthly at minimum, deploy SCPs to block IAM access key creation on phantom users, review and scope down the AmazonBedrockLimitedAccess policy, and plan migration to STS as soon as technically feasible.

The following table summarizes the security characteristics of each authentication method:

Feature IAM Access Keys STS Temporary Short-Term ABSK Long-Term ABS
Prefix AKIA* ASIA* bedrock-api-key-* ABSK*
Creates phantom user No No No Yes (Console)
Max lifetime Indefinite 12 hours 12 hours 365 days / Never
User persistence Until deleted N/A N/A Indefinite *
Authentication SigV4 signing SigV4 signing Bearer token Bearer token
Secret transmitted No (hashed) No (hashed) Yes Yes
GitHub scanning Yes Yes Yes (added Aug 2025) Yes (added Aug 2025)
Cleanup automation Manual Automatic Automatic None
Privilege escalation risk Medium Low Low High
  1. *Phantom users persist until manually deleted, but are commonly forgotten, and accumulate indefinitely.

NA

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Usage Methods

Regardless of key type, Bedrock API keys are region-specific and scoped to Bedrock operations only. They can be used through the AWS CLI by setting the AWS_BEARER_TOKEN_BEDROCK environment variable, through AWS SDKs by setting the same environment variable programmatically, or through raw HTTP requests by passing the key in the Authorization: Bearer header. The following examples show the syntax for each integration method.

AWS CLI:

```
export AWS_BEARER_TOKEN_BEDROCK="ABSK..."
aws bedrock invoke-model --model-id anthropic.claude-opus-4-7...
```

AWS SDKs:

```
import os
os.environ['AWS_BEARER_TOKEN_BEDROCK'] = 'ABSK...'
```

Raw HTTP:

```
curl --request POST \
--url "https://bedrock-runtime.us-east-1.amazonaws.com/model/..." \
--header "Authorization: Bearer ${BEDROCK_API_KEY}"
```

The Phantom IAM User Problem

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Automatic Provisioning (Console-Only)

When a long-term Bedrock API key is created through the AWS Console, AWS executes a five-step provisioning sequence:

  1. Creates an IAM user named BedrockAPIKey-<random-id>
  2. Attaches the AmazonBedrockLimitedAccess managed policy
  3. Generates a service-specific credential
  4. Logs the corresponding events in CloudTrail (CreateUser, AttachUserPolicy, CreateServiceSpecificCredential)
  5. Returns the ABSK credential to the caller

This entire sequence happens without a separate confirmation step or explicit consent prompt; the user requesting the API key sees only the final credential.


Phantom User Characteristics

These automatically provisioned IAM users are referred to as "phantom" users throughout this guide because they share a set of characteristics that make them effectively invisible to most security operations.

  • Silent Provisioning: The Console flow is framed as "Generate API key," not IAM user creation, so a new IAM user is provisioned without explicit consent.
  • Invisible: No console login capability and no MFA enrollment, so they never appear in identity access reviews that focus on human users.
  • Unowned: No human owner, so no team is accountable for their lifecycle.
  • Generic Naming: BedrockAPIKey-<random-id> pattern is easy to overlook or mistake for an automated service account.
  • Quiet Creation: CreateUser events buried in CloudTrail alongside routine API activity, with most organizations not alerting on new IAM user creation.

Part 2 of this guide (stay tuned for the next blog in the series) will include detection strategies with CloudTrail monitoring rules for identifying phantom user creation events. The result is that these users accumulate in the account without any team being aware of their existence or responsible for their cleanup.

This automatic provisioning is a Console-only behavior. When creating Bedrock API keys through the AWS CLI or SDK, the IAM user must already exist before the service-specific credential can be attached.

Figure 5: The Bedrock API keys management page in the AWS Console. The "generate long-term API key" button initiates the provisioning sequence that creates a phantom IAM user.

Figure 6: The key generation result. The Console returns the ABSK credential and displays the associated IAM username (BedrockAPIKey-xxxx), but the user creation itself occurred automatically without a separate confirmation step.

Figure 7: The phantom IAM user as it appears in the IAM Console. The AmazonBedrockLimitedAccess policy is already attached. This user was created automatically during API key provisioning and will persist indefinitely, even after the associated key is deleted.

The Persistence Problem

The most critical characteristic of phantom users is that they never auto-delete. The IAM user and its attached AmazonBedrockLimitedAccess policy persist indefinitely, regardless of what happens to the associated Bedrock API key. The key can expire, be manually deleted, or become inactive, but the phantom user still retains its full permissions.

Figure 8: IAM Console showing 31 phantom users accumulated in a single AWS account. Each BedrockAPIKey-* identity was created automatically during long-term API key provisioning and persists regardless of whether the associated credential is still active.

The implication is that every long-term Bedrock API key ever created through the Console has left a persistent IAM identity with administrative Bedrock permissions in the account, exploitable by anyone with iam:CreateAccessKey permissions.

Note: The persistent risk is the IAM identity, not the ABSK credential. Even after the ABSK credential expires or is deleted, the phantom user remains with the AmazonBedrockLimitedAccess policy attached. The credential has a lifecycle; the phantom user does not.

Understanding the "Limited" Policy

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

The AmazonBedrockLimitedAccess managed policy is automatically attached to every phantom user created during long-term API key provisioning. Despite the name suggesting restricted permissions, analysis of the full policy document reveals administrative-level control over the Bedrock service and cross-service reconnaissance capabilities that extend well beyond Bedrock.

Bedrock Permissions

The policy grants 47 specific bedrock:* actions covering the full create/read/update/delete lifecycle: Get*, List*, CallWithBearerToken, plus 9 explicit Delete* actions (including DeleteGuardrail, DeleteCustomModel, DeleteProvisionedModelThroughput), Create* and Update* across guardrails, custom models, evaluation jobs, inference profiles, prompt routers, and new automated-reasoning APIs. This includes the ability to delete guardrails (removing AI safety controls), delete custom fine-tuned models, delete provisioned throughput (disrupting production workloads), create and update all Bedrock resources, invoke any model at full quota, and enumerate the complete Bedrock environment. Effectively, this is not limited access. It's administrative control of the Bedrock service.

Figure 9: The AmazonBedrockLimitedAccess policy as displayed in the IAM Console, showing the Bedrock action permissions, including create, delete, and invoke operations across all Bedrock resources.

Reconnaissance Permissions

Beyond Bedrock operations, the policy grants permissions across three additional AWS services:

  • iam:ListRoles: Enumerate all IAM roles in the account, providing visibility into the identity infrastructure.
  • ec2:DescribeVpcs, ec2:DescribeSubnets, ec2:DescribeSecurityGroups: Map the complete network topology and firewall rules.
  • kms:DescribeKey: Discover encryption keys and their configurations.

None of these permissions are required for Bedrock API key authentication. They exist in the policy because the phantom user is a full IAM user, and the policy was designed for broader Bedrock administration, not for scoping down to bearer token access.

Figure 10: Continuation of the AmazonBedrockLimitedAccess policy, showing the cross-service reconnaissance permissions granted beyond Bedrock.

The Scoping Gap

AWS correctly scoped the Bedrock API key credential itself to Bedrock operations only. However, the IAM user that backs the credential is not scoped in the same way. This creates two distinct credential types with different permission boundaries on the same identity.

Figure 11: The phantom IAM user can support three access methods, only one of which exists by default. The Bedrock API key (scoped to Bedrock) is created during provisioning. IAM access keys (full policy permissions) only exist if iam:CreateAccessKey is invoked on the user. Console access only exists if iam:CreateLoginProfile is invoked. The AmazonBedrockLimitedAccess policy applies to all three credential types, but only the Bedrock API key enforces Bedrock-specific scoping at the credential boundary.

An ABSK bearer token authenticates only to Bedrock operations. However, anyone with iam:CreateAccessKey permissions can create standard IAM access keys (AKIA...) for a phantom user. Those access keys inherit the full AmazonBedrockLimitedAccess policy without Bedrock scoping: granting IAM role enumeration across the account, VPC network reconnaissance, and KMS encryption key discovery. The result is two credential types on one identity: the ABSK token constrained to Bedrock, and the potential AKIA access key operating with the full policy scope.

Key Structure and Decoding

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Bedrock API keys are not opaque tokens. Both long-term and short-term formats contain extractable information that has security implications for organizations using them.

Long-Term Key Format

Long-term keys use the ABSK prefix followed by a base64-encoded string. Decoding the base64 payload reveals the IAM username, the AWS Account ID, and the cryptographic secret material in a structured format:

```
echo "ABSKQmVkcm9ja0FQSUtleS..." | cut -c5- | base64 -d
Output: BedrockAPIKey-xxxx-at-123456789012:<cryptographic-secret>
```

AWS allows two Bedrock API keys per phantom user, following the same convention as IAM access keys. The primary key decodes with the standard username format (BedrockAPIKey-xxxx-at-ACCOUNTID:secret), while the secondary key includes a +1 indicator (BedrockAPIKey-xxxx+1-at-ACCOUNTID:secret). This means each phantom user can have two active ABSK credentials simultaneously, doubling the attack surface, if both are created.

Extractable information carries direct security consequences. For instance, the Account ID disclosure aids attacker reconnaissance by identifying the target AWS account, while the username disclosure enables targeted exploitation of the specific phantom user. Additionally, the consistent ABSK prefix enables automated secret scanning. While AWS partnered with GitHub to include ABSK pattern detection in GitHub's secret scanning program in August 2025, Scott Piper of Wiz Research had already observed leaked credentials in public repositories within two weeks of the feature's launch [6].

The Bedrock Keys Security (BKS) toolkit automates this decoding offline without requiring AWS credentials or API calls:

```
bks decode-key "ABSK..."
```


Short-Term Key Format

Short-term keys use the bedrock-api-key- prefix followed by a base64-encoded presigned URL. Decoding the payload reveals the full presigned URL structure, including the access key ID used to generate it, the target region, the expiration time, and a security token that contains the AWS Account ID:

```
bedrock-api-key-YmVkcm9ja0FQSUtleS...
```

Decodes to:

```
bedrock.amazonaws.com/?Action=CallWithBearerToken
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=<AccessKeyID>/<region>/bedrock/aws4_request
&X-Amz-Date=20260126T172726Z
&X-Amz-Expires=43200 (12 hours)
&X-Amz-Security-Token=<base64-encoded security token>
&X-Amz-Signature=<Signature>
&X-Amz-SignedHeaders=host
&Version=1
```

The Bedrock Keys Security (BKS) toolkit decodes both formats using the same command:

```
bks decode-key "bedrock-api-key-..."
```

Attack Scenarios

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

The phantom user architecture introduces multiple exploitation paths, as seen in Figure 12 below.

Figure 12: Attack surface overview. A single long-term API key creation produces two credential types (ABSK and potential AKIA) and two attacker profiles: one exploiting leaked Bedrock API keys for LLMjacking and destructive actions, and another exploiting phantom users through compromised IAM permissions for cross-service reconnaissance.

Credential Leaks

The most straightforward attack path begins with an ABSK credential committed to a public repository or exposed in application configuration. Because long-term keys use a consistent ABSK prefix, automated scanners can detect them immediately. Once exfiltrated, an attacker can validate the key with a single HTTP request. No AWS SDK or SigV4 signing is required.

```
curl --request GET \
--url "https://bedrock.us-east-1.amaz..." \
--header "Authorization: Bearer ${LEAKED_KEY}"
```

A valid key gives the attacker full administrative control over the Bedrock service through the AmazonBedrockLimitedAccess policy. This includes deleting guardrails to remove AI safety controls, maxing out model invocation quotas for LLMjacking operations, enumerating all Bedrock resources, and disrupting production workloads by deleting provisioned throughput or custom models. The simplicity of bearer token authentication (a single header in any HTTP client) lowers the barrier to exploitation significantly, compared to SigV4-authenticated credentials.

Compromised Administrator

When an attacker gains access to an account with IAM administrative permissions through phishing, malware, or an insider threat, phantom users become ready-made escalation paths. The attacker discovers BedrockAPIKey-* users by listing IAM users, then creates standard IAM access keys for them as shown below:

```
aws iam create-access-key --user-name BedrockAPIKey-xxxx
# Returns: AKIA... access key
```

These IAM access keys aren’t scoped to Bedrock. They inherit the full AmazonBedrockLimitedAccess policy, which includes iam:ListRoles for identity enumeration, ec2:DescribeVpcs, ec2:DescribeSubnets, and ec2:DescribeSecurityGroups for network topology mapping, and kms:DescribeKey for encryption key discovery. The attacker gains cross-service reconnaissance capabilities that extend well beyond what the original Bedrock API key credential would allow, and the IAM access keys don’t expire when the Bedrock API key does.

Privilege Escalation

An attacker with limited IAM permissions who can enumerate users and create access keys can escalate privileges through phantom users without needing any Bedrock credentials at all. The attacker lists IAM users, identifies BedrockAPIKey-* entries, and attempts to create access keys for them:

```
aws iam create-access-key --user-name BedrockAPIKey-xxxx
```

If successful, the attacker moves beyond limited permissions to achieve the full scope of the AmazonBedrockLimitedAccess policy (administrative Bedrock control, along with IAM, VPC, and KMS reconnaissance). The phantom users serve as pre-positioned escalation targets that exist in the account, regardless of whether the Bedrock API keys are actively in use. This also provides the attacker with a lateral movement opportunity and a persistence mechanism, since the access keys they create are independent of the original Bedrock credential lifecycle.

Real-World Exploitation: LLMjacking

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

LLMjacking represents a criminal economy where stolen cloud credentials authorized for AI inference are reused to power third-party AI chatbot platforms at the victim’s expense. Sysdig and Permiso first documented this pattern in 2024 [1][2], a year before AWS introduced Bedrock API keys, and the tactics have remained similar. Early incidents involved stolen IAM access keys and STS tokens monetized through OAI Reverse Proxy and similar resale infrastructure, with attackers running batched inference around the clock and routinely deleting CloudTrail log streams or model invocation logging configurations to reduce forensic evidence. Today, this same economic model, resale infrastructure, and operational playbook all carry over directly to stolen Bedrock API keys.

Figure 13: LLMjacking business model. Attackers steal Bedrock API keys, use them to power customer-facing AI chatbot platforms, charge users subscription fees (e.g., $30/month), and generate up to $1M/year in annualized revenue while the victim incurs up to $18,000/day per region in fraudulent Bedrock charges.

Documented Incidents

Multiple security research teams have confirmed significant financial impact from LLMjacking campaigns. One victim incurred $30,000 in charges within three hours from a single burst attack [1]. In another case, AWS proactively blocked a compromised key approximately 35 hours after a scale-up in request volume, but the initial malicious activity had begun 42 days prior [4].

Observed attack volumes reflect the scale of these operations. Researchers have tracked over 85,000 API requests against a single credential set within one month, with 61,000 concentrated in a three-hour window [3]. Another operation generated 75,000+ model invocations in just two days [4]. In both cases, attackers ran concurrent asynchronous tasks with sub-second delays between requests to maximize throughput [3].

Cost Exposure Model

A leaked Bedrock API key exposes the victim to up to $18,000 per day per region in fraudulent inference charges, derived from the default Bedrock service quota of 500,000 tokens per minute (720M tokens/day) and Claude Opus 4.7's $25-per-1M-token output rate [5].

This exposure compounds rapidly in multi-region environments: four to six active regions produce roughly $72,000 to $108,000 per day. Detection lag correlates directly with total damage, and extended compromise over days or weeks regularly produces six- and seven-figure exposure consistent with documented incidents [1].

Note: Per-token prices and quotas are accurate as of April 2026. These metrics can shift, verify current rates on the AWS Bedrock pricing page before quoting.

Exploitation Patterns

The exploitation sequence is consistent across documented incidents. Attackers harvest credentials from public repositories or exposed configuration files and validate them through automated tooling within minutes. Before scaling up, they check the account's logging configuration:

```
aws bedrock get-model-invocation-logging-configuration
```

If logging is disabled, exploitation begins immediately. If logging is enabled, attackers move on to the next target. Sysdig has documented disable attempts in the wild [3], but AmazonBedrockLimitedAccess only grants bedrock:Get* on the logging configuration, not bedrock:DeleteModelInvocationLoggingConfiguration or bedrock:PutModelInvocationLoggingConfiguration. An attacker confined to the phantom user's scope therefore can't tamper with logging; the disable attempts seen in the wild were almost certainly run with broader credentials. The defensive takeaway is direct: model invocation logging acts as both a deterrent (attackers skip accounts where it's enabled) and a hard barrier on what a leaked Bedrock API key can actually do.

Bedrock API keys introduce three aggravating factors that weren’t present in the IAM-credential incidents analyzed by Sysdig and Permiso:

  • Lower exploitation barrier: Bearer token authentication replaces SigV4 signing. A leaked key can be validated and exploited with a single curl command, removing the request-signing step that previously raised the technical bar for credential abuse.
  • Discoverable prefixes: The ABSK* and bedrock-api-key-* prefixes are in GitHub Secret Scanning. AWS added them to the partner pattern set in August 2025, which means attacker-controlled scanners detect the same prefixes that defender tooling does, often within minutes of a public commit.
  • Persistent IAM identity: Long-term key creation leaves a phantom IAM user. The user retains the AmazonBedrockLimitedAccess policy indefinitely and remains exploitable through iam:CreateAccessKey even after the original key is rotated, deleted, or expired.

Part 2 of this guide, Detection, Defense, and Response, builds on these findings with deployable controls. It includes CloudTrail detection rules anchored on the callWithBearerToken signal, Service Control Policy templates that block long-term key creation and phantom user privilege escalation, containment playbooks for compromised long-term and short-term keys, and a migration path from Bedrock API keys to STS temporary credentials.

References

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Cited Sources

  • [1] Sysdig, "2024 Global Threat Year-in-Review" (Oct 2024) https://sysdig.com/press-releases/sysdig-2024-threat-report
  • [2] Sysdig TRT, "LLMjacking: Stolen Cloud Credentials Used in New AI Attack" (May 2024) https://sysdig.com/blog/llmjacking-stolen-cloud-credentials-used-in-new-ai-attack
  • [3] Sysdig TRT, "The Growing Dangers of LLMjacking" (Sept 2024) https://sysdig.com/blog/growing-dangers-of-llmjacking
  • [4] Permiso P0 Labs, "When AI Gets Hijacked: Exploiting Hosted Models" (Oct 2024) https://permiso.io/blog/exploiting-hosted-models
  • [5] AWS, "Amazon Bedrock Pricing" https://aws.amazon.com/bedrock/pricing
  • [6] Scott Piper (Wiz Research), "A new type of long-lived key on AWS: Bedrock API keys" (Aug 2025) https://www.wiz.io/blog/a-new-type-of-long-lived-key-on-aws-bedrock-api-keys

Open-source Toolkit

  • Bedrock Keys Security Toolkit: https://github.com/BeyondTrust/bedrock-keys-security


Tools and Documentation

  • Bedrock API Keys User Guide:
    https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html
  • AWS Security Blog: Securing Bedrock API Keys:
    https://aws.amazon.com/blogs/security/securing-amazon-bedrock-api-keys-best-practices-for-implementation-and-management/
  • Service-Specific Credentials:
    https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_service-specific-creds.html
  • AWS Security Token Service (STS):
    https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html
  • CloudTrail Event Reference:
    https://docs.aws.amazon.com/bedrock/latest/userguide/logging-using-cloudtrail.html

Explore More Research from Phantom Labs

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied

Phantom Labs™ researchers "think like attackers" to expose privilege escalation paths and identity attack vectors, helping defenders proactively uncover misconfigurations and detect threats in complex hybrid and cloud environments. Using advanced graph modeling, Phantom Labs researchers map attack paths to privileged access across cloud and on-premises infrastructure.

Continue Reading

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied
  • https://www.beyondtrust.com/blog/entry/pwning-aws-agentcore-code-interpreter
  • https://www.beyondtrust.com/blog/entry/machine-learning-identity-graph-anomaly-detection
  • https://www.beyondtrust.com/blog/entry/salesforce-access-risk

About the Author

White chain icon to symbolize the ability to copy a link
Link copied
Check mark to visually show text has been copied
Profile
Sergio Garcia
Security Researcher

Sergio Garcia (@MrCloudSec) is a Security Researcher on the Phantom Labs™ team at BeyondTrust. Sergio has a background in cloud security, identity-centric attack paths, and automated threat detection. He was previously a founding engineer at Prowler.

400x400 Linkedin X Profile
Phantom Labs™
BeyondTrust

BeyondTrust Phantom Labs™ believes the best way to fully understand cybersecurity threats is to work closely with our customers and partners, conducting real world research into the attacks that matter most to them. By dissecting emerging attack methods and exploitation techniques of threat actors, as well as conducting novel research, the team’s mission is to help organizations defend against identity threats. 

Latest Posts
  • Hooked on Identity (Part 2): Abusing OAuth Trust Boundaries in Okta
    Jun 12, 2026 Hooked on Identity (Part 2): Abusing OAuth Trust Boundaries in Okta
    Blog
    7m
  • Hooked on Identity: Abusing SAML Assertion Inline Hooks in Okta
    Jun 9, 2026 Hooked on Identity: Abusing SAML Assertion Inline Hooks in Okta
    Blog
    6m
  • Joining Project Glasswing: Securing the Privilege Backbone of the AI Era
    Jun 8, 2026 Joining Project Glasswing: Securing the Privilege Backbone of the AI Era
    Blog
    5m
  • The Most Common & Most Dangerous Types of Shadow IT
    Jun 5, 2026 The Most Common & Most Dangerous Types of Shadow IT
    Blog
    19m
  • 14 Password Management Best Practices
    May 28, 2026 14 Password Management Best Practices
    Blog
    12m
Related
  • Detecting Hidden Privilege with Machine Learning: Anomaly Detection in BeyondTrust’s True Privilege Graph
    Apr 27, 2026 Detecting Hidden Privilege with Machine Learning: Anomaly Detection in BeyondTrust’s True Privilege Graph
    Blog
    5m
  • The Spooky Privilege Pathways Lurking in your IT Environment... and How to Fight Back
    Oct 31, 2025 The Spooky Privilege Pathways Lurking in your IT Environment... and How to Fight Back
    Blog
    6m
Share this Article
  • Link
Tags
  • AWS Bedrock Security
  • BeyondTrust Research Team
  • Phantom Labs
Stay up to Date
Get the latest news, ideas, and tactics from BeyondTrust. You may unsubscribe at any time.

Keep up with BeyondTrust

Customer Support Get Started
  • LinkedIn
  • X
  • Facebook
  • Instagram
  • Add BeyondTrust as a preferred source on Google
  • Privacy
  • Security
  • Manage Cookies
  • Do Not Sell My Data
  • WEEE Compliance

Copyright © 2003 — 2026 BeyondTrust Corporation. All rights reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust Corporation is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.

Prefers reduced motion setting detected. Animations will now be reduced as a result.