Find Every Public EC2 Instance in 10 Minutes

Aug 26, 2026

"Show me all EC2 instances that are public."

One question. About 10 minutes. Manually, the same answer is a 10-day job.

In this clip, the CloudQuery AI assistant works it out live: it finds the
EC2 instances table, reads the schema, identifies public_ip_address as the field that signals public exposure, and queries for every instance that has one. It comes back with 2 running public EC2 instances — instance type, public IP and DNS, private IP, VPC, subnet and tags for each — and flags that both are reachable from the internet, subject to security group rules.

Without CloudQuery, finding publicly exposed resources across an AWS Organization means:

  • Enumerate every ACTIVE account with aws organizations list-accounts (5-15 min) — and if you run it from a member account instead of the management account, it silently returns just one row
  • Assume a cross-account audit role into each account, then enumerate per region, per service (30-90 min per service) — legacy accounts missing OrganizationAccountAccessRole drop out of the report silently
  • Script the control evaluation for every candidate resource (1-3 hours per control, and the logic doesn't generalize)
  • Resolve owning business unit from tags that may live on the resource or only on the parent account

That's days of scripting to answer one security question — and you start over for the next control.

CloudQuery syncs AWS, Azure, GCP, Kubernetes, Entra ID and more into one normalized cloud asset inventory you can query in SQL or plain English. Public exposure, encryption gaps, untagged resources, drift — same table, same query, every account and region.

How much time could you save?

→ Try it: https://cloudquery.io
→ Docs: https://docs.cloudquery.io

CloudQuery, part of env zero.

#AWS #CloudSecurity #DevOps