AWS Bedrock AgentCore Resource Created with IAM Execution Role

Last updated 7 days ago on 2026-08-25
Created 7 days ago on 2026-08-25

About

Detects the creation of an AWS Bedrock AgentCore resource (code interpreter, agent runtime, browser, or harness) with an IAM execution role attached. When an attacker with iam:PassRole permission creates an AgentCore resource and attaches a privileged role, subsequent invocations inside that resource execute as the attached role — enabling privilege escalation to roles that trust bedrock-agentcore.amazonaws.com.
Tags
Domain: CloudData Source: AWSData Source: Amazon Web ServicesPlatform: AWSData Source: AWS CloudTrailService: AWS BedrockService: AWS IAMTactic: Privilege EscalationTactic: PersistenceRule Type: Custom Query (KQL)Language: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Privilege Escalation (TA0004)(external, opens in a new tab or window)

Persistence (TA0003)(external, opens in a new tab or window)

False Positive Examples
Legitimate provisioning of Bedrock AgentCore resources by CI/CD pipelines or platform engineers. Validate the caller identity against expected provisioning principals and verify the attached role is commensurate with the workload's documented requirements.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Query (Kibana Query Language)
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-aws.cloudtrail-*
Related Integrations

aws(external, opens in a new tab or window)

Query
text code block:
event.dataset: "aws.cloudtrail" and event.provider: "bedrock-agentcore.amazonaws.com" and event.action: ( "CreateCodeInterpreter" or "CreateAgentRuntime" or "CreateBrowser" or "CreateHarness" ) and event.outcome: "success" and aws.cloudtrail.request_parameters: (*executionRoleArn* or *roleArn*) and not aws.cloudtrail.user_identity.invoked_by: ("bedrock-agentcore.amazonaws.com" or "cloudformation.amazonaws.com")

Install detection rules in Elastic Security

Detect AWS Bedrock AgentCore Resource Created with IAM Execution Role in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).