AWS

Security

Tutorials

Finding Cross-Account AWS EventBridge Usage

Overview

Recently, AWS sent out customer notification emails regarding upcoming changes for EventBridge cross-account event bus targets. This email was titled Security posture recommendations for your cross-account invocations. This notification email went to customers who were determined to have one or more impacted resources.

In this post, we'll cover how one of our users, James Barney, used CloudQuery to respond to the AWS notification and change with a custom query built on top of CloudQuery's data.

Customer Testimonial

“CloudQuery helped us understand the exact impact that this AWS service change would have for our organization’s 100+ AWS accounts within 5 minutes of receiving the notification. CloudQuery saved us weeks of investigative work and gave us exactly the resource ARNs we needed to alter with this change.”

EventBridge Change

Beginning February 16, 2023, Amazon EventBridge will start requiring IAM roles for all new cross-account event bus targets.

Previously, Amazon EventBridge did not require usage of IAM roles when sending events to cross-account event buses. Other routing use cases including cross-region or within the same account already require IAM roles for event bus to event bus delivery use cases.

Sample Resource Policy:

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccountExternal",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123412341234:root"
},
"Action": "events:PutEvents",
"Resource": "arn:aws:events:us-east-1:111111111111:event-bus/wheels-on-the-bus"
}
]
}

What this Means

With this notice, AWS provided 90 days for customers to update their infrastructure-as-code templates for any new event bus targets.

We recommend ensuring all legacy cross-account event bus targets are updated. To do so, we need to do the following:

  • Find all impacted EventBridge Event Buses
  • Update all impacted EventBridge Event Buses (Stepping through environments and testing to ensure no adverse impact)
  • Validating that there are no legacy EventBridge Event Buses and they've all been updated to use IAM roles.

For cross-account access, scoping permissions and principals in resource policies helps with reducing access and improves your cloud security posture.

Customer Query

We would like to thank James Barney for sharing their use case and working with us on the below query. We're especially happy when our users bring innovation and layer advanced queries on top of CloudQuery data to provide value to their organizations.

SELECT *
FROM
(
SELECT account_id, name, policy, arn,
regexp_matches(policy, '[0-9]{12}:root', 'g') as ext_account
FROM aws_eventbridge_event_buses
) data
WHERE account_id != ext_account[1];

The above query will detect any usage the AWS account reference for cross-account access to Amazon EventBridge Event Buses and will return a table of each occurrence of a cross-account reference. If there are multiple accounts referenced in a policy, each account will be a separate row.

By filtering on the regex [0-9]{12}:root, we look for any string that matches part of an AWS account resource identifier such as 1213412341234:root. While we do look through the entire policy, AWS account ARNs should only exist in the Principal block of statements.


Want to see CloudQuery in action? Schedule a demo with our team or check out the platform documentation to learn more.

Want help getting started? Join the CloudQuery community to connect with other users and experts, or message our team directly here if you have any questions.

If you have use cases or custom queries and examples from using CloudQuery, we would love to hear from you! Reach out to us on GitHub or our Community!

References and Useful Links

AWS: Service Control Policies (SCPs)

AWS: Sending and receiving Amazon EventBridge events between AWS Account

AWS EventBridge API Reference: PutTargets

CloudQuery: AWS integration

Try CloudQuery yourself

Self-hosted, open source, and free to start. Or schedule a demo to see the managed version.

Related posts

AWS

Security

Tutorials

Finding AWS Unrestricted Outbound Access in 2026: EC2, Lambda, and Beyond

Find EC2, Lambda, and ECS Fargate resources with unrestricted outbound access in AWS using SQL. Why egress controls still break attack chains in 2026.

Joe Karlsson

Joe Karlsson

May 5, 2026

AWS

Security

Tutorials

AWS IAM Identity Center with Google Workspace as an IdP: 2026 Step-by-Step Guide

Set up AWS IAM Identity Center with Google Workspace: SAML authentication, SCIM user provisioning, and group sync with CLI or ssosync. Updated for 2026.

Joe Karlsson

Joe Karlsson

May 5, 2026

AWS

Cloud Infrastructure

Security

Tutorials

Integrate AbuseIPDB Threat Intelligence with CloudQuery

Enrich your cloud asset inventory with AbuseIPDB threat intelligence to identify public cloud IPs with known abuse reports.

Joe Karlsson

Joe Karlsson

April 20, 2026

AWS

Security

Tutorials

AWS IAM Identity Center (Formerly AWS SSO): The Complete 2026 Guide

AWS IAM Identity Center replaced AWS SSO in 2022. Learn how to set it up, configure permission sets, use the AWS CLI, and audit access with CloudQuery.

Joe Karlsson

Joe Karlsson

April 6, 2026

AWS

Security

Tutorials

Set Up AWS CLI with SSO (IAM Identity Center) — Step by Step

Configure AWS CLI v2 with IAM Identity Center in 5 minutes. Covers sso-session setup, automatic token refresh, and switching between multi-account profiles.

Yevgeny Pats

Yevgeny Pats

February 25, 2026

AWS

GCP

Security

Tutorials

How to Inventory All Public IP Addresses Across AWS and GCP using CloudQuery

Track every public IP across AWS and GCP in minutes with SQL. Find exposed EC2 instances, unused Elastic IPs, and GCP Compute resources in one place.

Adam Cobb

Adam Cobb

Joe Karlsson

Joe Karlsson

December 19, 2025

AWS

Azure

GCP

Security

Tutorials

How to Find Internet-Facing Cloud Assets in AWS, Azure and GCP

Find all internet-facing cloud resources across AWS, Azure, and GCP. Identify exposed VMs, storage, databases, and load balancers to reduce attack surface.

Adam Cobb

Adam Cobb

November 5, 2025

AWS

Security

Tutorials

DORA Compliance Made Simple with CloudQuery

Ensure DORA compliance with CloudQuery. Automate cloud asset inventory, run SQL-powered audits, and benchmark against security best practices.

Mohamed Labouardy

Mohamed Labouardy

February 10, 2025

AWS

Security

Tutorials

How To List All Expired SSL Certificates on AWS

Learn how to identify expired AWS SSL/TLS certificates using CloudQuery. Sync your AWS data, run SQL queries, and consolidate results to ensure cloud security.

Joe Karlsson

Joe Karlsson

February 5, 2025

Own your pipeline.
Own your data.