top of page
  • Cloud Life Team

Steampipe: Unlock the Potential of AWS Cost Savings with SQL

In this blog post, we'll dive into Steampipe, an open-source CLI tool that simplifies discovering AWS resources for cost optimization. The goal is to have the most cost-effective infrastructure without sacrificing performance. Steampipe allows you to quickly find resources you can target for cost savings, leveraging the familiarity and flexibility of SQL.

Steampipe: Empowering Cloud Infrastructure Management with SQL

Steampipe is an innovative tool that allows you to query your AWS resources using SQL, making identifying and managing your cloud infrastructure more straightforward. Using Steampipe, you can quickly find unutilized or underutilized resources, such as EC2 instances, EBS volumes, and RDS databases, which are prime targets for cost optimization.

Uncovering Cost-Saving Opportunities with Steampipe

Finding resources to target cost savings using Steampipe is straightforward. Here are some examples of SQL queries that can help you identify potential cost-saving opportunities, along with an example of how much money each action might save per year:

1.Find Unused EC2 Instances:

SELECT instance_id, instance_state, instance_type
FROM aws_ec2_instance
WHERE instance_state = 'stopped';

Example savings: Terminating a stopped t3.medium instance could save around $360 per year, depending on the region and other factors.

2.Locate Unattached EBS Volumes:

SELECT volume_id, size, state
FROM aws_ebs_volume
WHERE state = 'available';

Example savings: Deleting a 100 GB unattached gp2 EBS volume might save about $120 per year, depending on the region and other factors.

3.Identify Idle RDS Instances:

SELECT db_instance_identifier, engine, db_instance_status
FROM aws_rds_db_instance
WHERE db_instance_status = 'stopped';

Example savings: Stopping a db.t3.medium RDS instance for a full year could save approximately $1,080 per year, depending on the region and other factors.

4.Discover Underutilized EC2 Instances:

SELECT instance_id, instance_type, cpu_credit_usage
FROM aws_ec2_instance_metric_cpu_credit_usage
WHERE cpu_credit_usage < [YOUR_THRESHOLD];

Example savings: Downgrading an underutilized m5.large instance to a t3.small instance might save you around $648 per year, depending on the region and other factors.

Taking Action for Cost Optimization

Once you've identified unutilized and underutilized resources using Steampipe, it's time to take action. Depending on your specific needs, you might consider the following:

  1. Terminating or stopping unused EC2 instances and RDS databases

  2. Deleting unattached EBS volumes

  3. Resizing underutilized EC2 instances and RDS databases to match resource needs better

By taking these actions, you can save significant costs while maintaining a robust and efficient cloud infrastructure.


Steampipe is a powerful tool that simplifies identifying cost-saving opportunities within your AWS infrastructure. By leveraging the power of SQL, Steampipe enables you to quickly find unutilized and underutilized resources and take action to optimize costs. Start using Steampipe today and unlock the potential for substantial cost savings in your AWS environment.


Recent Posts

See All

Steps to Upgrade IPv4 to IPv6

As you probably know AWS is now charging for the use of every public IPv4 IP address used in your environment. The current rate is $.005/hr and while that doesn’t sound like much it amounts to approxi

How to Read IPv6 Addresses

IPv6 (Internet Protocol version 6) addressing has been around about 20 years now. It was implemented when it became apparent that we would run out of IPv4 addresses. The move to IPv6 has been slow but

Discover How Many IPv4 Addresses You will be Charged For

Starting Feb 1, 2024 AWS will charge your account for every IPv4 in your account whether it is attached or not. That is approx. $45/year for every single IPv4. Here are AWS services that can assign pu


bottom of page