Report an issue
Back to transformation list
aws-asset-inventory
Official

AWS Asset Inventory (Free)

dbt AWS Asset Inventory pack (free version)

Publisher

cloudquery

Latest version

v2.0.1

Type

Transformation

Published

Feb 15, 2024

Category

Cloud Infrastructure

Need Help? Book a call

CloudQuery × dbt: AWS Asset Inventory Package

Overview

This package contains dbt models (views) that aggregates AWS Resources for AWS Asset Inventory. This currently only supports PostgreSQL as a destination.
 

Requirements

One of the below databases:
dbt Installation
An example of how to install dbt to work with the destination of your choice.
First, install dbt for the destination of your choice:
An example installation of dbt-postgres:
pip install dbt-postgres
These commands will also install install dbt-core and any other dependencies.
Create the profile directory:
mkdir -p ~/.dbt
Create a profiles.yml file in your profile directory (e.g. ~/.dbt/profiles.yml):
aws_asset_inventory: # This should match the name in your dbt_project.yml
  target: dev
  outputs:
    dev:
      type: postgres
      host: 127.0.0.1
      user: postgres
      pass: pass
      port: 5432
      dbname: aws
      schema: public # default schema where dbt will build the models
      threads: 1 # number of threads to use when running in parallel
Test the Connection:
After setting up your profiles.yml, you should test the connection to ensure everything is configured correctly:
dbt debug
This command will tell you if dbt can successfully connect to your destination database.
Running Your dbt Project
Navigate to your dbt project directory, where your dbt_project.yml resides.
Before executing the dbt run command, it might be useful to check for any potential issues:
dbt compile
If everything compiles without errors, you can then execute:
dbt run
This command will run your dbt models and create tables/views in your destination database as defined in your models.
To run specific models and the models in the dependency graph, the following dbt run commands can be used:
For a specific model and the models in the dependency graph:
dbt run --select +<model_name>
For a specific folder and the models in the dependency graph:
dbt run --models +<model_name>
Models
  • aws_resources: AWS Resources View, available for PostgreSQL.
    • Required tables: This model has no specific table dependencies, other than requiring a single CloudQuery table from the AWS plugin that has an ARN.
Subscribe to product updates

Be the first to know about new features.