Steampipe IaSQL setup and first look Featured Image

Steampipe IaSQL (Infrastructure as SQL) for AWS – Setup and first look

In the cloud computing world managing the infrastructure is a significant challenge for cloud users. There is a number of innovative solutions available in the market such as Infrastructure as Code (IaC), Infrastructure as Diagram, and Infrastructure as SQL, etc. Today, we will see one such example of open-source Infrastructure as SQL tool, Steampipe IaSQL. In this blog, we will try to set up Steampipe CLI and will see first look how it works.

I am going to use Windows 11 via Windows Subsystem for Linux (WSL 2.0) with Ubuntu, but all the steps are going to be the same for other types of operating systems as well.

Steampipe IaSQL CLI Installation

As a first step, we need to install Steampipe IaSQL CLI which will further help us with interaction with the tool.

sudo /bin/sh -c "$(curl -fsSL"
Steampipe IaSQL CLI installation

Once we have installed it, we can check out the version of it using the below command.

steampipe -v

Install AWS Plugin

Steampipe IaSQL works based on a plugin architecture. There are different plugins available for different cloud providers. We can even write our own plugin as per our needs. We are going to test, the already available AWS plugin, which we can install using the below command.

steampipe plugin install aws
Steampipe IaSQL aws plugin installation

Now that we have the AWS plugin installed in Steampipe IaSQL, we need to export our AWS credentials in order for Steampipe to access our environment. Please note: we can also use ~/.aws/credentials file as well. For our test purpose, I have created a test user in my AWS account and assigned it an Administrator role.

Create Test User

Steampipe IaSQL test user in AWS
Now the next step is to create programmatic credentials from this user and export those credentials to the terminal.
Steampipe IaSQL export credentials

First Query with Steampipe IaSQL

Now we are all good to execute a few queries and see the first look of the magic that happens behind the scenes with SQL. I tried to fetch aws_vpc, aws_iam_user, and aws_iam_role here. But there is a lot to explore here.

Steampipe IaSQL first select query

The first impression is really good, it looks very promising that complex cloud infrastructure is available in the form of SQL. I would love to try more with this amazing IaSQL tool. I will post more blogs about it as I learn more.

Vishal Gupta
Vishal Gupta
Articles: 36

Leave a Reply

Your email address will not be published. Required fields are marked *