Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » AWS/Azure/OpenShift » How to Manage Cloud Assets in AWS with CloudQuery
  • Microsoft365
    Microsoft 365 Backup: Why is it imperative to protect M365? Backup
  • article 1280x720.13392821
    How to use command prompt to shutdown and restart your computer Windows
  • windows 10 bjw3 1280x720 1
    Difference between testing and debugging Windows
  • PSD
    PowerShell Deployment Extension for MDT: How to deploy Windows using PSD, Microsoft Deployment Toolkit, and Windows Deployment Services Windows Server
  • VM Disk
    Initialize and format a virtual disk: How to add and remove a new virtual disk from a VM on VMware Workstation Virtualization
  • the Execute permission was denied
    Fix An error has occurred during report processing (rsProcessingAborted) Oracle/MSSQL/MySQL
  • images 5
    How to Perform a Self-service Password Reset using the Windows Login Integration Client Password Manager
  • Hibernation and faststartup
    Enable or Disable hibernation: How to fix the missing fast startup option on Windows Windows

How to Manage Cloud Assets in AWS with CloudQuery

Posted on 14/07/202227/07/2023 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on How to Manage Cloud Assets in AWS with CloudQuery
cloudqueryfeature

Cloud-based asset management enables centralized data storage, which may help organizations easily access their cloud estates from anywhere, as any device that supports an internet connection can view this information. In addition, the main advantage is that it offers data security. The good thing about these kinds of software programs is that they not only give you visibility into your cloud estates, but they can also track any lapse between recorded and what’s on the ground so that you can take the right measure. With the possibility to find and keep an eye on all an organization’s assets, audit and budget teams can easily make plans as they give a digital depiction of a real-world thing. Thus, this article explains how to manage Cloud Assets in AWS with CloudQuery.

Concisely, Cloud Asset management is a technique for gathering data and information about the asset as they often automate asset management so that the entire asset is not handled manually. Thus, there are precise real-time data available to the user. Find other guides here Charmed Kubernetes: How to install CNF-certified Kubernetes in AWS and how To Install Google Cloud SDK on a Linux system and how to install Microsoft Teams on a Ma,c PC also How to Cancel Office 365 Family Subscription and How to download a shared ZOOM recording also How to install AnyDesk on a Linux Machine and how to offload individual Apps on iPhone

Benefits of Managing Cloud Assets

Below are the benefits of using Cloud Assets Management Software.

  • Security: Every piece of data is kept in an encrypted format. The cloud management system provides data security as a result, and most of the time, information about the item being queried is often metadata about that item.
  • Correctness: Any computation done by hand is prone to mistakes. Thus, accurate information is provided through a cloud-based management system.
  • Speed: A lot of time may be saved when assets can be tracked conveniently from any device with an internet connection.
  • Accurate Decisions: Since reliable asset statistics are available, businesses may make better decisions.
  • Centralized Data AcceEveryvery asset’s data is collected in a single location. As a result, retrieving it is simple.

What is CloudQuery

Powered by SQL and supported by PostgreSQL, CloudQuery is an open-source cloud asset inventory. Furthermore, your cloud infrastructure and SaaS apps are pulled, normalized, exposed, and monitored as SQL databases, allowing you to inspect, audit, and evaluate the settings of your cloud assets. As a result, you may use SQL to create security, governance, cost, and compliance requirements.

This abstracts numerous dispersed APIs. Therefore, you can easily add more resources and SaaS providers to CloudQuery with ease (open an Issue in GitHub). For this article, we will use Cloudquery for cloud asset management. Below are the prerequisite for setting up CloudQuery.

  1. An AWS Account
  2. Security credentials (Access key & secret key)
  3. AWS CLI
  4. Ubuntu Machine.

Step1: Setting up our local environment with AWS

We need to install AWS CLI on our local machine: we can do this with the command below. Here are some guides relating to AWS CLI: How to add an EBS volume to AWS EC2 via the AWS Console and CLI, how to configure Command Line Interface [Part 2], and AWS Command-Line Interface: How to configure AWS CLI [Part 1].

sudo apt install awscli

After this, we can confirm its installation with the command shown below:

How to manage your Cloud Assets in AWS with CloudQuery=aws-cli-installed-1
aws cli

Next, you need to configure your machine and bind it with your security credentials; you can do so with the command:

aws configure
How to manage your Cloud Assets in AWS with CloudQuery-awsconfigure
aws configure

Step2: Download and Install Cloud Query to Manage Cloud Assets

Afterward, you may use CLI or releases to download the precompiled binary with the command:

curl -L https://github.com/cloudquery/cloudquery/releases/latest/download/cloudquery_linux_arm64 -o cloudquery
chmod a+x cloudquery
How to manage your Cloud Assets in AWS with CloudQuery-cloudquery-install
cloudquery instal

Step2: Running

Furthermore, you must create a cloudquery.yml file after installing CloudQuery that specifies the cloud provider and resources you wish to utilize. A cloud query to an ETL: Following the installation of CloudQuery, you must create a cloudquery.yml file that specifies the cloud provider and resources that CloudQuery should ETL, and you can accomplish this with the command:

./cloudquery init aws
How to manage your Cloud Assets in AWS with CloudQuery-config
cloudquery.yml

Step 3: Install Docker to Manage Cloud Assets

we need Docker for the next step to be able to instalPostgreses database, this can be done with the command below:

sudo apt install docker.io

So, here is the output below

root@ubuntu:/home/rdgmh# apt install docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.11.0-27-generic linux-hwe-5.11-headers-5.11.0-27
  linux-image-5.11.0-27-generic linux-modules-5.11.0-27-generic
  linux-modules-extra-5.11.0-27-generic
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  aufs-tools btrfs-progs cgroupfs-mount | cgroup-lite debootstrap docker-doc
  rinse zfs-fuse | zfsutils
The following packages will be upgraded:
  docker.io
1 upgraded, 0 newly installed, 0 to remove and 141 not upgraded.
Need to get 31.8 MB of archives.
After this operation, 29.7 MB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 docker.io amd64 20.10.12-0ubuntu2~20.04.1 [31.8 MB]
Fetched 12.2 MB in 1min 48s (113 kB/s)                                         
Preconfiguring packages ...
(Reading database ... 242327 files and directories currently installed.)
Preparing to unpack .../docker.io_20.10.12-0ubuntu2~20.04.1_amd64.deb ...
Unpacking docker.io (20.10.12-0ubuntu2~20.04.1) over (20.10.7-0ubuntu5~20.04.2) 
...
Setting up docker.io (20.10.12-0ubuntu2~20.04.1) ...
Processing triggers for man-db (2.9.1-1) ...
root@ubuntu:/home/rdgmh# 

Step 4: Spawn a Local Database with Docker

Cloudquery will, by default, attempt to connect to the Postgres database at localhost:5432. with the credentials postgres and pass. After installing Docker, use the command below to establish a local Postgres instance:

docker run --name cloudquery_postgres -p 5432:5432 -e POSTGRES_PASSWORD=pass -d postgres
How to manage your Cloud Assets in AWS with CloudQuery-postgres
postgres

Step 5: Authenticate with AWS

So, to retrieve details about your cloud configuration, CloudQuery requires authentication through your AWS account.

export AWS_ACCESS_KEY_ID={Your AWS Access Key ID}
export AWS_SECRET_ACCESS_KEY={Your AWS secret access key}
export AWS_SESSION_TOKEN={Your AWS session token}
How to manage your Cloud Assets in AWS with CloudQuery-export_keys
export credentials

Step 6: Fetch your AWS Resources

Since cloudquery.yml has been generated and you are authenticated with A; runun the following command to fetch the resources.

./cloudquery fetch
fetch
fetch

Step 7: Run PSQL on the previously installed Docker

After CloudQuery has retrieved the resources, you may use SQL to explore your cloud infrastructure. Running psql on the Docker

docker exec -it cloudquery_postgres psql -U postgres
psql
psql ready

Step 8: Run Queries to Help Manage Cloud AssHere are ats

A few examples of queries for AWS:

SELECT * FROM aws_elbv2_load_balancers WHERE scheme = 'internet-facing';
loadbalancer
query result

Summary

In conclusion, Cloudquery is an open-source cloud asset inventory tool that can help you gain visibility into your cloud estate and you can by following the steps above. With the steps mentioned earlier, you can manage your cloud assets in AWS with CloudQuery.

I hope you found this blog post helpful. Please let me know in the comment session if you have any questions.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift

Post navigation

Previous Post: Install CNF Certified Kubernetes in AWS
Next Post: How to install Zoom video conference software on Linux System

Related Posts

  • header picture
    Creating and Deploying Docker Registry Using Docker Image AWS/Azure/OpenShift
  • banner
    Various ways to restart an AWS EC2 instance AWS/Azure/OpenShift
  • Remove Custom Domain from Entra ID and Azure tenant
    Delete Azure Tenant: Remove Custom Domain from Entra ID AWS/Azure/OpenShift
  • Ec2 Instance
    How to create an EC2 Instance AWS/Azure/OpenShift
  • AWS Budget
    How to manage costs with AWS Budgets AWS/Azure/OpenShift
  • Generate SSH Keys
    Associate SSH Public key with Azure Linux VM AWS/Azure/OpenShift

More Related Articles

header picture Creating and Deploying Docker Registry Using Docker Image AWS/Azure/OpenShift
banner Various ways to restart an AWS EC2 instance AWS/Azure/OpenShift
Remove Custom Domain from Entra ID and Azure tenant Delete Azure Tenant: Remove Custom Domain from Entra ID AWS/Azure/OpenShift
Ec2 Instance How to create an EC2 Instance AWS/Azure/OpenShift
AWS Budget How to manage costs with AWS Budgets AWS/Azure/OpenShift
Generate SSH Keys Associate SSH Public key with Azure Linux VM AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Microsoft365
    Microsoft 365 Backup: Why is it imperative to protect M365? Backup
  • article 1280x720.13392821
    How to use command prompt to shutdown and restart your computer Windows
  • windows 10 bjw3 1280x720 1
    Difference between testing and debugging Windows
  • PSD
    PowerShell Deployment Extension for MDT: How to deploy Windows using PSD, Microsoft Deployment Toolkit, and Windows Deployment Services Windows Server
  • VM Disk
    Initialize and format a virtual disk: How to add and remove a new virtual disk from a VM on VMware Workstation Virtualization
  • the Execute permission was denied
    Fix An error has occurred during report processing (rsProcessingAborted) Oracle/MSSQL/MySQL
  • images 5
    How to Perform a Self-service Password Reset using the Windows Login Integration Client Password Manager
  • Hibernation and faststartup
    Enable or Disable hibernation: How to fix the missing fast startup option on Windows Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,839 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.