Hunting for Ghost Databases in the Cloud
Learn how to detect "ghost databases" which are abandoned cloud database instances that remain active and incur costs despite having no connections or ownership. While this topic applies to all cloud platforms, the lab demonstrates detection techniques with Amazon RDS. You'll use both AWS-native tools (CloudWatch metrics, RDS Performance Insights, Cost Explorer) and open-source/multi-cloud solutions (Steampipe for SQL-based queries and Cloud Custodian for policy-based automation). Through these tools, you'll discover how to identify inactive RDS instances by analyzing connection patterns, missing tags, and usage metrics over extended periods. Please note: databases take a while to deploy, so this lab can take up to 10 minutes to be ready. Familiarize yourself with the lab guide below while you wait!
- 14 guided tasks
- Terminal in the browser

Scenario
In this lab, we'll teach you how to find ghost database resources in your cloud environments. While the lab is completed in an AWS environment with RDS databases, the concepts apply to other cloud providers as well. The open source tools we'll demo can be used across cloud environments.
Note: Amazon RDS takes a few minutes to deploy, so this lab can take 7-10 minutes to launch. While it's launching, please familiarize yourself with the lab guide below.
What you will learn
- Find RDS instances with no connections by reading the CloudWatch DatabaseConnections metric
- Query Performance Insights for database load with a Python script
- Find RDS instances that have no ownership tags with the AWS CLI
- Join RDS instance data and CloudWatch metrics in one Steampipe SQL query
- Detect idle and untagged RDS instances with Cloud Custodian policies